-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Description
Cipher.decrypt method has aad parameter but Cipher.decryptString method doesn't.
Future<List<int>> decrypt(
SecretBox secretBox, {
required SecretKey secretKey,
List<int> aad = const <int>[], // <-- parameter
Uint8List? possibleBuffer,
});Missing:
Future<String> decryptString(
SecretBox secretBox, {
required SecretKey secretKey,
}) async {
final clearText = await decrypt(
secretBox,
secretKey: secretKey,
// `aad` param can be passed here
);
try {
return utf8.decode(clearText);
} finally {
// Don't leave possibly sensitive data in the heap.
tryEraseBytes(clearText);
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels