diff options
author | Mattias Andrée <maandree@kth.se> | 2024-08-24 10:04:37 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-08-24 10:04:37 +0200 |
commit | cbe3b01daad36d3ba8f3d2e4c1e0d5645aa44010 (patch) | |
tree | 128aa07e1a8e8bb2738b4b3db40d455d2151952c /sha_224.c | |
parent | Standardise how to interpret a partial byte (diff) | |
download | libhashsum-cbe3b01daad36d3ba8f3d2e4c1e0d5645aa44010.tar.gz libhashsum-cbe3b01daad36d3ba8f3d2e4c1e0d5645aa44010.tar.bz2 libhashsum-cbe3b01daad36d3ba8f3d2e4c1e0d5645aa44010.tar.xz |
Test partial byte support in SHA1 and SHA-224
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | sha_224.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -19,7 +19,14 @@ static struct testcase testcases[] = { #endif {1, 0, "abc", "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7"}, {1, 0, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525"} + "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525"}, + {0, 1, "\x01", "0d05096bca2a4a77a2b47a05a59618d01174b37892376135c1b6e957"}, + {0, 2, "\x02", "ef9c947a47bb9311a0f2b8939cfc12090554868b3b64d8f71e6442f3"}, + {0, 3, "\x04", "4f2ec61c914dce56c3fe5067aa184125ab126c39edb8bf64f58bdccd"}, + {0, 4, "\x05", "b04c423c9091ff5bb32ea4b0063e98814633350c1bc2bd974f776fd2"}, + {0, 5, "\x0d", "e3b048552c3c387bcab37f6eb06bb79b96a4aee5ff27f51531a9551c"}, + {0, 6, "\x2b", "44b64a6dbd91d49df5af0c9f8e001b1378e1dc29c4b891350e5d7bd9"}, + {0, 7, "\x0c", "20f25c1fe299cf337ff7ff9cc4b5b5afac076759720174a29ba79db6"} }; |