]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
HMAC-SHA1: add test with 64 byte size key
authorPavel Tvrdík <pawel.tvrdik@gmail.com>
Mon, 30 Nov 2015 13:04:57 +0000 (14:04 +0100)
committerPavel Tvrdík <pawel.tvrdik@gmail.com>
Mon, 30 Nov 2015 13:04:57 +0000 (14:04 +0100)
lib/sha1_test.c

index 802ba7b68732ec0c05583945a397eb2b792773a2..b239287b25703cc1e2a9a5d6a6320d0e21b646ab 100644 (file)
@@ -206,6 +206,23 @@ t_sha1_hmac(void)
          },
          .out = "e8e99d0f45237d786d6bbaa7965c7808bbff1a91",
       },
+      {
+         .in  = {
+             .key = {
+                 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
+                 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
+                 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
+                 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
+                 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
+                 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
+                 0x61, 0x61, 0x61, 0x61,
+             },
+             .key_len = 64,
+             .data = "Test Using key 64 bytes sized",
+             .data_len = 29,
+         },
+         .out = "a55d4fb80962a6b3d2e720705314bee417d68cf6",
+      },
   };
 
   bt_assert_fn_in_out(get_sha1_hmac, in_out, NULL, "'%s'");