eciesEncryptFuture method

Future<Message> eciesEncryptFuture(
  1. String text, {
  2. dynamic publicKey = 0,
  3. bool returnAesKey = false,
})

Encrypt a text using the publickey or user's sites unique publickey

Return: Encrypted text using base64 encoding

Implementation

Future<Message> eciesEncryptFuture(
  String text, {
  dynamic publicKey = 0,
  bool returnAesKey = false,
}) async {
  var resultStr = await ZeroNet.instance.cmdFuture(
    ZeroNetCmd.eciesEncrypt,
    params: {
      'text': text,
      'publickey': publicKey,
      'return_aes_key': returnAesKey,
    },
  );
  return resultStr.message!;
}