diff options
author | Paul Mackerras <paulus@samba.org> | 1997-04-30 05:55:14 +0000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 1997-04-30 05:55:14 +0000 |
commit | cd4ae9df44da03efa56bfa4e32e751cbfc3b972c (patch) | |
tree | 01aaa137e15f2f5af18128b54c927d5e344432d7 /pppd/md5.c | |
parent | 9678d8e116c5f9ae854b9f744ebf3f6aae85d16a (diff) | |
download | ppp-cd4ae9df44da03efa56bfa4e32e751cbfc3b972c.tar.gz |
change MD5Final to explicitly return hash
Diffstat (limited to 'pppd/md5.c')
-rw-r--r-- | pppd/md5.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -156,7 +156,8 @@ unsigned int inLen; /* The routine MD5Final terminates the message-digest computation and ends with the desired message digest in mdContext->digest[0...15]. */ -void MD5Final (mdContext) +void MD5Final (hash, mdContext) +unsigned char hash[]; MD5_CTX *mdContext; { UINT4 in[16]; @@ -193,6 +194,7 @@ MD5_CTX *mdContext; mdContext->digest[ii+3] = (unsigned char)((mdContext->buf[i] >> 24) & 0xFF); } + memcpy(hash, mdContext->digest, 16); } /* Basic MD5 step. Transforms buf based on in. |