From 37dc4df270b0080442a9e36f9ea13855db9253e6 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 22 Feb 2020 05:37:01 +0000 Subject: md5/sha256: Updated the functions to allow non-string data to be hashed --- tests/unit/unit1610.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/unit/unit1610.c') diff --git a/tests/unit/unit1610.c b/tests/unit/unit1610.c index 06c97198b..bb9c937c9 100644 --- a/tests/unit/unit1610.c +++ b/tests/unit/unit1610.c @@ -41,14 +41,14 @@ UNITTEST_START unsigned char output[SHA256_DIGEST_LENGTH]; unsigned char *testp = output; - Curl_sha256it(output, (const unsigned char *) string1); + Curl_sha256it(output, (const unsigned char *) string1, strlen(string1)); verify_memory(testp, "\x6b\x86\xb2\x73\xff\x34\xfc\xe1\x9d\x6b\x80\x4e\xff\x5a\x3f" "\x57\x47\xad\xa4\xea\xa2\x2f\x1d\x49\xc0\x1e\x52\xdd\xb7\x87" "\x5b\x4b", SHA256_DIGEST_LENGTH); - Curl_sha256it(output, (const unsigned char *) string2); + Curl_sha256it(output, (const unsigned char *) string2, strlen(string2)); verify_memory(testp, "\xcb\xb1\x6a\x8a\xb9\xcb\xb9\x35\xa8\xcb\xa0\x2e\x28\xc0\x26" -- cgit v1.2.3