Skip to content
Snippets Groups Projects
Commit 14705241 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

cast pw_in to const unsigned char *

parent 38df8bdf
Branches
Tags
No related merge requests found
......@@ -205,7 +205,8 @@ hash_md5 (const char *pw_in, Salt * salt)
unsigned char MD5digest[16];
lutil_MD5Init (&MD5context);
lutil_MD5Update (&MD5context, pw_in, strlen(pw_in));
lutil_MD5Update (&MD5context,
(const unsigned char *)pw_in, strlen(pw_in));
if (salt && salt->salt && salt->len)
lutil_MD5Update (&MD5context, salt->salt, salt->len);
lutil_MD5Final (MD5digest, &MD5context);
......@@ -220,7 +221,8 @@ hash_sha1 (const char *pw_in, Salt * salt)
unsigned char SHA1digest[20];
lutil_SHA1Init (&SHA1context);
lutil_SHA1Update (&SHA1context, pw_in, strlen(pw_in));
lutil_SHA1Update (&SHA1context,
(const unsigned char *)pw_in, strlen(pw_in));
if (salt && salt->salt && salt->len)
lutil_SHA1Update (&SHA1context, salt->salt, salt->len);
lutil_SHA1Final (SHA1digest, &SHA1context);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment