From 39a0a44730a012663dd3088684c15005d93d9875 Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Wed, 25 May 2022 23:29:02 +0200 Subject: [PATCH] fix: change tag length in aes gcm cipher --- packages/native_crypto/lib/src/ciphers/aes/aes.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/native_crypto/lib/src/ciphers/aes/aes.dart b/packages/native_crypto/lib/src/ciphers/aes/aes.dart index f899c5c..267c91b 100644 --- a/packages/native_crypto/lib/src/ciphers/aes/aes.dart +++ b/packages/native_crypto/lib/src/ciphers/aes/aes.dart @@ -3,7 +3,7 @@ // ----- // File: aes.dart // Created Date: 16/12/2021 16:28:00 -// Last Modified: 25/05/2022 15:40:07 +// Last Modified: 25/05/2022 21:17:10 // ----- // Copyright (c) 2022 @@ -67,7 +67,8 @@ class AES implements Cipher { List.empty(); return CipherText.fromPairIvAndBytes( cipherText, - dataLength: cipherText.last.length, + dataLength: cipherText.last.length - 16, + tagLength: 16, ); }