encrypt method

  1. @override
EncryptedData encrypt(
  1. List<int> input
)

Implementation

@override
EncryptedData encrypt(List<int> input) {
  var encrypter = crypto.Encrypter(
    crypto.AES(_getKey(), mode: crypto.AESMode.cbc),
  );
  var iv = _getIv();
  var data = encrypter.encryptBytes(input, iv: iv).bytes.toList();
  return EncryptedData.from(data, iv.bytes.toList());
}