#ifndef SHA512_H
#define SHA512_H
#include "ustd.h"
#ifdef __cplusplus
extern "C" {
#endif
#define sha512_block_size 128
#define sha512_hash_size 64
#define sha384_hash_size 48
typedef struct sha512_ctx
{
uint64_t message[16];
uint64_t length;
uint64_t hash[8];
unsigned digest_length;
} sha512_ctx;
void rhash_sha384_init(sha512_ctx* ctx);
void rhash_sha512_init(sha512_ctx* ctx);
void rhash_sha512_update(sha512_ctx* ctx, const unsigned char* data, size_t length);
void rhash_sha512_final(sha512_ctx* ctx, unsigned char* result);
#ifdef __cplusplus
}
#endif
#endif