decrypt method
- @nonVirtual
- @override
- SecretBox secretBox, {
- required SecretKey secretKey,
- List<
int> aad = const <int>[], - int keyStreamIndex = 0,
override
Decrypts a ciphertext.
Parameter keyStreamIndex
allows you to choose offset in the keystream.
For other arguments, see Cipher.decrypt.
Implementation
@nonVirtual
@override
Future<List<int>> decrypt(
SecretBox secretBox, {
required SecretKey secretKey,
List<int> aad = const <int>[],
int keyStreamIndex = 0,
}) async {
final secretKeyData = await secretKey.extract();
return decryptSync(
secretBox,
secretKeyData: secretKeyData,
aad: aad,
keyStreamIndex: keyStreamIndex,
);
}