aesDecrypt static method

String aesDecrypt(
  1. String encryptStr,
  2. String key,
  3. String iv
)

Implementation

static String aesDecrypt(String encryptStr, String key, String iv) {
  //final keyId = Key(Uint8List.fromList(HEX.decode(key)));
  final encrypter =
      Encrypter(AES(Key.fromUtf8(key), mode: AESMode.cbc, padding: 'PKCS7'));
  final decrypted = encrypter.decrypt64(encryptStr, iv: IV.fromUtf8(iv));
  return decrypted;
}