encrypt method
Encrypt bytes
.
Implementation
@override
Encrypted encrypt(Uint8List bytes, {IV? iv, Uint8List? associatedData}) {
if (publicKey == null) {
throw StateError('Can\'t encrypt without a public key, null given.');
}
_cipher
..reset()
..init(true, _publicKeyParams!);
return Encrypted(_cipher.process(bytes));
}