From ab6592861713fcae4d3c3d831ae75394e6262582 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 28 May 2021 02:59:18 +0200 Subject: Update internal SHA1 and SHA1Update function prototypes to match OpenSSL's SHA1/SHA1_Update --- src/sha1.c | 20 ++++++++++---------- src/sha1.h | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/sha1.c b/src/sha1.c index 09e68fd..02557ff 100644 --- a/src/sha1.c +++ b/src/sha1.c @@ -197,12 +197,12 @@ void SHA1Init( void SHA1Update( SHA1_CTX * context, const unsigned char *data, - uint32_t len + size_t len ) { - uint32_t i; + size_t i; - uint32_t j; + size_t j; j = context->count[0]; if ((context->count[0] += len << 3) < j) @@ -279,16 +279,16 @@ void SHA1Final( } void SHA1( - char *hash_out, - const char *str, - int len) + const unsigned char *str, + size_t len, + unsigned char *hash_out +) { SHA1_CTX ctx; - unsigned int ii; + size_t ii; SHA1Init(&ctx); for (ii=0; ii