decryptBytes method

List<int> decryptBytes({
  1. required List<int> data,
  2. String? key,
  3. String? iv,
})

Implementation

List<int> decryptBytes({
  required List<int> data,
  String? key,
  String? iv,
}) {
  iv ??= this.iv;
  key ??= this.key;
  final encrypter = Encrypter(AES(Key.fromUtf8(key)));
  return encrypter.decryptBytes(Encrypted(Uint8List.fromList(data)),
      iv: IV.fromBase64(iv));
}