Mercurial > dropbear
diff sha224.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/sha224.c Tue Jun 15 14:07:21 2004 +0000 +++ b/sha224.c Sun Dec 19 11:34:45 2004 +0000 @@ -28,7 +28,7 @@ }; /* init the sha256 er... sha224 state ;-) */ -void sha224_init(hash_state * md) +int sha224_init(hash_state * md) { _ARGCHK(md != NULL); @@ -42,6 +42,7 @@ md->sha256.state[5] = 0x68581511UL; md->sha256.state[6] = 0x64f98fa7UL; md->sha256.state[7] = 0xbefa4fa4UL; + return CRYPT_OK; } int sha224_done(hash_state * md, unsigned char *hash) @@ -50,7 +51,7 @@ int err; err = sha256_done(md, buf); - memcpy(hash, buf, 28); + XMEMCPY(hash, buf, 28); #ifdef CLEAN_STACK zeromem(buf, sizeof(buf)); #endif