2016-01-25 06:40:42 +00:00
|
|
|
#ifndef __SERVALD_SHA512_H
|
|
|
|
#define __SERVALD_SHA512_H
|
2011-12-13 09:04:12 +00:00
|
|
|
|
|
|
|
|
2016-01-25 06:40:42 +00:00
|
|
|
typedef struct crypto_hash_sha512_state {
|
|
|
|
uint64_t state[8];
|
|
|
|
uint64_t count[2];
|
|
|
|
unsigned char buf[128];
|
|
|
|
} crypto_hash_sha512_state;
|
|
|
|
size_t crypto_hash_sha512_statebytes(void);
|
2011-12-13 09:04:12 +00:00
|
|
|
|
2016-01-25 06:40:42 +00:00
|
|
|
#ifndef crypto_hash_sha512_BYTES
|
|
|
|
#define crypto_hash_sha512_BYTES 64U
|
2011-12-13 09:04:12 +00:00
|
|
|
#endif
|
|
|
|
|
2016-01-25 06:40:42 +00:00
|
|
|
size_t crypto_hash_sha512_bytes(void);
|
2011-12-13 09:04:12 +00:00
|
|
|
|
|
|
|
|
2016-01-25 06:40:42 +00:00
|
|
|
int crypto_hash_sha512(unsigned char *out, const unsigned char *in,
|
|
|
|
unsigned long long inlen);
|
2011-12-13 09:04:12 +00:00
|
|
|
|
|
|
|
|
2016-01-25 06:40:42 +00:00
|
|
|
int crypto_hash_sha512_init(crypto_hash_sha512_state *state);
|
2011-12-13 09:04:12 +00:00
|
|
|
|
|
|
|
|
2016-01-25 06:40:42 +00:00
|
|
|
int crypto_hash_sha512_update(crypto_hash_sha512_state *state,
|
|
|
|
const unsigned char *in,
|
|
|
|
unsigned long long inlen);
|
2011-12-13 09:04:12 +00:00
|
|
|
|
|
|
|
|
2016-01-25 06:40:42 +00:00
|
|
|
int crypto_hash_sha512_final(crypto_hash_sha512_state *state,
|
|
|
|
unsigned char *out);
|
2011-12-13 09:04:12 +00:00
|
|
|
|
2016-01-25 06:40:42 +00:00
|
|
|
#endif
|