encrypt method
EncryptionResult
encrypt(})
Encrypt content
Implementation
EncryptionResult encrypt(List<int> data,
{List<int>? initializationVector,
List<int>? additionalAuthenticatedData,
String? algorithm}) {
_assertCanDo('encrypt');
algorithm ??= this.algorithm;
var encrypter =
_keyPair.publicKey!.createEncrypter(_getAlgorithm(algorithm));
return encrypter.encrypt(data as Uint8List,
initializationVector: initializationVector as Uint8List?,
additionalAuthenticatedData: additionalAuthenticatedData as Uint8List?);
}