1 #ifndef crypto_hash_sha512_H
2 #define crypto_hash_sha512_H
5 * WARNING: Unless you absolutely need to use SHA512 for interoperatibility,
6 * purposes, you might want to consider crypto_generichash() instead.
7 * Unlike SHA512, crypto_generichash() is not vulnerable to length
19 # pragma GCC diagnostic ignored "-Wlong-long"
24 typedef struct crypto_hash_sha512_state {
27 unsigned char buf[128];
28 } crypto_hash_sha512_state;
30 #define crypto_hash_sha512_BYTES 64U
32 size_t crypto_hash_sha512_bytes(void);
35 int crypto_hash_sha512(unsigned char *out, const unsigned char *in,
36 unsigned long long inlen);
39 int crypto_hash_sha512_init(crypto_hash_sha512_state *state);
42 int crypto_hash_sha512_update(crypto_hash_sha512_state *state,
43 const unsigned char *in,
44 unsigned long long inlen);
47 int crypto_hash_sha512_final(crypto_hash_sha512_state *state,