Mercurial > dropbear
diff sha384.c @ 143:5d99163f7e32 libtomcrypt-orig
import of libtomcrypt 0.99
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 19 Dec 2004 11:34:45 +0000 |
parents | 6362d3854bb4 |
children | 7ed585a2c53b |
line wrap: on
line diff
--- a/sha384.c Tue Jun 15 14:07:21 2004 +0000 +++ b/sha384.c Sun Dec 19 11:34:45 2004 +0000 @@ -30,7 +30,7 @@ &sha384_test }; -void sha384_init(hash_state * md) +int sha384_init(hash_state * md) { _ARGCHK(md != NULL); @@ -44,6 +44,7 @@ md->sha512.state[5] = CONST64(0x8eb44a8768581511); md->sha512.state[6] = CONST64(0xdb0c2e0d64f98fa7); md->sha512.state[7] = CONST64(0x47b5481dbefa4fa4); + return CRYPT_OK; } int sha384_done(hash_state * md, unsigned char *hash) @@ -58,7 +59,7 @@ } sha512_done(md, buf); - memcpy(hash, buf, 48); + XMEMCPY(hash, buf, 48); #ifdef CLEAN_STACK zeromem(buf, sizeof(buf)); #endif