encryptBytes static method
Implementation
static Uint8List encryptBytes(
Uint8List byteData,
String textKey,
) {
final encryptionPassword = _getModifiedPasswordFrom(textKey.safeSubString(0, 4)!);
final iv = IV.fromUtf8(_getModifiedIvPasswordFrom(textKey));
final encrypter = Encrypter(AES(Key.fromUtf8(encryptionPassword), mode: AESMode.cbc));
return (encrypter.encryptBytes(byteData, iv: iv).bytes);
}