From 28b0c9a6bf5a8a01310a9777afa21ed966edcc7f Mon Sep 17 00:00:00 2001 From: Martijn de Milliano Date: Tue, 30 Jun 2026 16:16:37 +0200 Subject: [PATCH] Process review comments on test_encrypt_short_tag --- tests/test_aesgcmstream.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_aesgcmstream.py b/tests/test_aesgcmstream.py index f2e3e47..97c63b5 100644 --- a/tests/test_aesgcmstream.py +++ b/tests/test_aesgcmstream.py @@ -32,6 +32,7 @@ if _lib.AESGCM_STREAM_ENABLED: from wolfcrypt.ciphers import AesGcmStream def test_encrypt(): + """Known answer encrypt-decrypt test with default authentication tag size of 16 bytes""" key = "fedcba9876543210" iv = "0123456789abcdef" gcm = AesGcmStream(key, iv) @@ -44,7 +45,9 @@ if _lib.AESGCM_STREAM_ENABLED: gcmdec.final(authTag) assert bufdec == t2b("hello world") + @pytest.mark.skipif(12 < _lib.MIN_AUTH_TAG_SZ, reason="test can only be performed when MIN_AUTH_TAG_SZ is larger than 12") def test_encrypt_short_tag(): + """Known answer encrypt-decrypt test with specific authentication tag size of 12 bytes""" key = "fedcba9876543210" iv = "0123456789abcdef" gcm = AesGcmStream(key, iv, 12)