1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 14:35:03 -05:00

md5: Use pointer notation for array parameters in GnuTLS implementation

This commit is contained in:
Steve Holme 2020-02-25 22:40:28 +00:00
parent f0ec0e902a
commit 5aea558dc8
No known key found for this signature in database
GPG Key ID: 4059CB85CA7E8F19

View File

@ -51,7 +51,7 @@ static void MD5_Update(MD5_CTX *ctx,
md5_update(ctx, inputLen, input); md5_update(ctx, inputLen, input);
} }
static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) static void MD5_Final(unsigned char *digest, MD5_CTX *ctx)
{ {
md5_digest(ctx, 16, digest); md5_digest(ctx, 16, digest);
} }
@ -77,7 +77,7 @@ static void MD5_Update(MD5_CTX *ctx,
gcry_md_write(*ctx, input, inputLen); gcry_md_write(*ctx, input, inputLen);
} }
static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) static void MD5_Final(unsigned char *digest, MD5_CTX *ctx)
{ {
memcpy(digest, gcry_md_read(*ctx, 0), 16); memcpy(digest, gcry_md_read(*ctx, 0), 16);
gcry_md_close(*ctx); gcry_md_close(*ctx);
@ -119,7 +119,7 @@ static void MD5_Update(MD5_CTX *ctx,
CC_MD5_Update(ctx, input, inputLen); CC_MD5_Update(ctx, input, inputLen);
} }
static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) static void MD5_Final(unsigned char *digest, MD5_CTX *ctx)
{ {
CC_MD5_Final(digest, ctx); CC_MD5_Final(digest, ctx);
} }
@ -151,7 +151,7 @@ static void MD5_Update(MD5_CTX *ctx,
CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0); CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
} }
static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) static void MD5_Final(unsigned char *digest, MD5_CTX *ctx)
{ {
unsigned long length = 0; unsigned long length = 0;
CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0); CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);