From 6e6c5deb3b802b576d885e0db7666826f377cf98 Mon Sep 17 00:00:00 2001 From: BirjuVachhani Date: Sun, 11 Jan 2026 00:09:08 +0530 Subject: [PATCH 1/2] add missing `aad` param for decryptString method. --- cryptography/lib/src/cryptography/cipher.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cryptography/lib/src/cryptography/cipher.dart b/cryptography/lib/src/cryptography/cipher.dart index 8d0033a..4416ade 100644 --- a/cryptography/lib/src/cryptography/cipher.dart +++ b/cryptography/lib/src/cryptography/cipher.dart @@ -259,10 +259,12 @@ abstract class Cipher { Future decryptString( SecretBox secretBox, { required SecretKey secretKey, + List aad = const [], }) async { final clearText = await decrypt( secretBox, secretKey: secretKey, + aad: aad, ); try { return utf8.decode(clearText); From ec70c7fc6b14d4a75e5a8a8edebc10bac3ea6fc7 Mon Sep 17 00:00:00 2001 From: BirjuVachhani Date: Sun, 11 Jan 2026 11:23:06 +0530 Subject: [PATCH 2/2] fix: update aad parameter initialization to use const list --- cryptography/lib/src/cryptography/cipher.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptography/lib/src/cryptography/cipher.dart b/cryptography/lib/src/cryptography/cipher.dart index 4416ade..51ebe31 100644 --- a/cryptography/lib/src/cryptography/cipher.dart +++ b/cryptography/lib/src/cryptography/cipher.dart @@ -217,7 +217,7 @@ abstract class Cipher { required SecretKey secretKey, required List nonce, required FutureOr mac, - List aad = const [], + List aad = const [], bool allowUseSameBytes = false, }) async* { final state = newState(); @@ -259,7 +259,7 @@ abstract class Cipher { Future decryptString( SecretBox secretBox, { required SecretKey secretKey, - List aad = const [], + List aad = const [], }) async { final clearText = await decrypt( secretBox,