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