diff options
author | Volker Lendecke <vl@samba.org> | 2009-12-14 19:29:36 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2010-01-07 11:07:55 +0100 |
commit | be05d71b9e3fe3c73ada46f7bb7745bf19633716 (patch) | |
tree | ea29b2663ee8d7095fd7cf2f8cfc70356b6d5546 /libcli/auth | |
parent | 5e2fc28b639a3944c272bbc5664e3da209c81365 (diff) | |
download | samba-be05d71b9e3fe3c73ada46f7bb7745bf19633716.tar.gz samba-be05d71b9e3fe3c73ada46f7bb7745bf19633716.tar.bz2 samba-be05d71b9e3fe3c73ada46f7bb7745bf19633716.zip |
Simplify E_md5hash a bit
Diffstat (limited to 'libcli/auth')
-rw-r--r-- | libcli/auth/smbencrypt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c index a3182cd806..f7c60e7de1 100644 --- a/libcli/auth/smbencrypt.c +++ b/libcli/auth/smbencrypt.c @@ -100,13 +100,9 @@ bool E_md4hash(const char *passwd, uint8_t p16[16]) void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16]) { struct MD5Context tctx; - uint8_t array[32]; - - memset(hash_out, '\0', 16); - memcpy(array, salt, 16); - memcpy(&array[16], nthash, 16); MD5Init(&tctx); - MD5Update(&tctx, array, 32); + MD5Update(&tctx, salt, 16); + MD5Update(&tctx, nthash, 16); MD5Final(hash_out, &tctx); } |