1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 08:38:49 -05:00

md4: Use const for the length input parameter

This keeps the interface the same as md5 and sha256.
This commit is contained in:
Steve Holme 2020-02-23 18:46:24 +00:00
parent 1f4911bc26
commit baf0b680f9
No known key found for this signature in database
GPG Key ID: 4059CB85CA7E8F19
2 changed files with 6 additions and 3 deletions

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -28,7 +28,8 @@
#define MD4_DIGEST_LENGTH 16
void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len);
void Curl_md4it(unsigned char *output, const unsigned char *input,
const size_t len);
#endif /* !defined(CURL_DISABLE_CRYPTO_AUTH) */

View File

@ -508,9 +508,11 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
#endif /* CRYPTO LIBS */
void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len)
void Curl_md4it(unsigned char *output, const unsigned char *input,
const size_t len)
{
MD4_CTX ctx;
MD4_Init(&ctx);
MD4_Update(&ctx, input, curlx_uztoui(len));
MD4_Final(output, &ctx);