50 # define NEED_UINT_64T
53 #if defined( INC_ALL )
59 #if defined(__cplusplus)
71 #define SHA224_DIGEST_SIZE 28
72 #define SHA224_BLOCK_SIZE 64
73 #define SHA256_DIGEST_SIZE 32
74 #define SHA256_BLOCK_SIZE 64
89 #define sha224_hash sha256_hash
107 #define SHA2_MAX_DIGEST_SIZE SHA256_DIGEST_SIZE
111 #define SHA384_DIGEST_SIZE 48
112 #define SHA384_BLOCK_SIZE 128
113 #define SHA512_DIGEST_SIZE 64
114 #define SHA512_BLOCK_SIZE 128
115 #define SHA2_MAX_DIGEST_SIZE SHA512_DIGEST_SIZE
125 typedef sha512_ctx sha384_ctx;
130 sha512_ctx ctx512[1];
138 #define sha384_hash sha512_hash
139 VOID_RETURN sha384_end(
unsigned char hval[], sha384_ctx ctx[1]);
140 VOID_RETURN sha384(
unsigned char hval[],
const unsigned char data[],
unsigned long len);
143 VOID_RETURN sha512_hash(
const unsigned char data[],
unsigned long len, sha512_ctx ctx[1]);
144 VOID_RETURN sha512_end(
unsigned char hval[], sha512_ctx ctx[1]);
145 VOID_RETURN sha512(
unsigned char hval[],
const unsigned char data[],
unsigned long len);
150 INT_RETURN sha2(
unsigned char hval[],
unsigned long size,
const unsigned char data[],
unsigned long len);
154 #if defined(__cplusplus)