aesDecryptFuture method

Future<Message> aesDecryptFuture(
  1. String? iv,
  2. String? encryptedText,
  3. String? key, {
  4. List<List<String>> encryptedTexts = const [],
  5. List<String> keys = const [],
})

Decrypt a text using AES

Return: Decrypted text

Implementation

Future<Message> aesDecryptFuture(
  String? iv,
  String? encryptedText,
  String? key, {
  List<List<String>> encryptedTexts = const [],
  List<String> keys = const [],
}) async {
  var params = [];
  if (encryptedText != null) {
    params = [iv, encryptedText, key];
  } else {
    params = [encryptedTexts, keys];
  }
  var resultStr = await ZeroNet.instance.cmdFuture(
    ZeroNetCmd.aesDecrypt,
    params: params,
  );
  return resultStr.message!;
}