sha224.h (495B)
1 /* public domain sha224 implementation based on fips180-3 */ 2 3 #include "sha256.h" 4 5 #define sha224 sha256 /*struct*/ 6 7 enum { SHA224_DIGEST_LENGTH = 28 }; 8 9 /* reset state */ 10 void sha224_init(void *ctx); 11 /* process message */ 12 #define sha224_update sha256_update 13 /* get message digest */ 14 /* state is ruined after sum, keep a copy if multiple sum is needed */ 15 /* part of the message might be left in s, zero it if secrecy is needed */ 16 void sha224_sum(void *ctx, uint8_t md[SHA224_DIGEST_LENGTH]);