eciesEncryptFuture method

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

Encrypted text in base64 format or Encrypted text in base64 format, AES key in base64 format.

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.toMessage();
}