encryptWithKey method
Provided some binary data and a SymmetricKey (key type dependant on the encryption scheme being used) Return an EncryptionResult
Implementation
@override
Future<EncryptionResult> encryptWithKey(
List<int> data, EncryptionKey key) async {
assert(key is SymmetricKey, 'AES requires a `SymmetricKey`');
final artefacts = EncryptionArtefacts(
authData: utf8.encode('none'),
authTag: utf8.encode('none'),
salt: SecretKeyData.random(length: _saltBytesLength).bytes,
);
return encryptWithKeyAndArtefacts(data, key, artefacts);
}