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