encryptBytes static method

List<int> encryptBytes(
  1. List<int> value,
  2. String encryptionKey, {
  3. String? ivBase64,
})

Implementation

static List<int> encryptBytes(List<int> value, String encryptionKey,
    {String? ivBase64}) {
  var aesEncrypter = Encrypter(AES(Key.fromBase64(encryptionKey)));
  var encryptedValue = aesEncrypter.encryptBytes(value, iv: getIV(ivBase64));
  return encryptedValue.bytes;
}