From cbe3b01daad36d3ba8f3d2e4c1e0d5645aa44010 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 24 Aug 2024 10:04:37 +0200 Subject: Test partial byte support in SHA1 and SHA-224 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- sha1.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sha1.c') diff --git a/sha1.c b/sha1.c index 3a465e8..faeea45 100644 --- a/sha1.c +++ b/sha1.c @@ -19,7 +19,14 @@ static struct testcase testcases[] = { {0x41000000UL, 8, "\0", "320c617b0b6ee1b6f9c3271eae135f40cae22c10"}, {0x6000003FUL, 0, "\x84", "b20aa99b62e6a480fd93b4d24b2c19ffac649bb8"}, #endif - {1000000UL, 8, "\0", "bef3595266a65a2ff36b700a75e8ed95c68210b6"} + {1000000UL, 8, "\0", "bef3595266a65a2ff36b700a75e8ed95c68210b6"}, + {0, 1, "\x00", "bb6b3e18f0115b57925241676f5b1ae88747b08a"}, + {0, 2, "\x01", "ec6b39952e1a3ec3ab3507185cf756181c84bbe2"}, + {0, 3, "\x04", "a37596ec13a0d2f9e6c0b8b96f9112823aa6d961"}, + {0, 4, "\x0d", "ba582f5967911beb91599684c2eb2baeefb78da7"}, + {0, 5, "\x09", "3320540d1c28b96ddd03eee1b186a8f2ae883fbe"}, + {0, 6, "\x08", "b372bd120957ebc3392cd060e131699d1fee6059"}, + {0, 7, "\x22", "04f31807151181ad0db278a1660526b0aeef64c2"} }; -- cgit v1.2.3-70-g09d2