4 #define SHA384_SUM_LEN 48
5 #define SHA384_DER_LEN 19
6 #define SHA512_SUM_LEN 64
7 #define SHA512_DER_LEN 19
8 #define SHA512_BLOCK_SIZE 128
10 #define CHUNKSZ_SHA384 (16 * 1024)
11 #define CHUNKSZ_SHA512 (16 * 1024)
14 uint64_t state[SHA512_SUM_LEN / 8];
16 uint8_t buf[SHA512_BLOCK_SIZE];
19 extern const uint8_t sha512_der_prefix[];
21 void sha512_starts(sha512_context * ctx);
22 void sha512_update(sha512_context *ctx, const uint8_t *input, uint32_t length);
23 void sha512_finish(sha512_context * ctx, uint8_t digest[SHA512_SUM_LEN]);
25 void sha512_csum_wd(const unsigned char *input, unsigned int ilen,
26 unsigned char *output, unsigned int chunk_sz);
28 extern const uint8_t sha384_der_prefix[];
30 void sha384_starts(sha512_context * ctx);
31 void sha384_update(sha512_context *ctx, const uint8_t *input, uint32_t length);
32 void sha384_finish(sha512_context * ctx, uint8_t digest[SHA384_SUM_LEN]);
34 void sha384_csum_wd(const unsigned char *input, unsigned int ilen,
35 unsigned char *output, unsigned int chunk_sz);
38 #endif /* _SHA512_H */