2013-01-11 18:54:40 -05:00
|
|
|
#ifndef SHA512_H
|
|
|
|
#define SHA512_H
|
|
|
|
|
2013-01-21 16:28:34 -05:00
|
|
|
#include <stddef.h>
|
2013-01-11 18:54:40 -05:00
|
|
|
|
2013-01-21 16:28:34 -05:00
|
|
|
#include "fixedint.h"
|
2013-01-11 18:54:40 -05:00
|
|
|
|
2013-01-21 16:28:34 -05:00
|
|
|
/* state */
|
|
|
|
typedef struct sha512_context_ {
|
|
|
|
uint64_t length, state[8];
|
|
|
|
size_t curlen;
|
|
|
|
unsigned char buf[128];
|
|
|
|
} sha512_context;
|
2013-01-11 18:54:40 -05:00
|
|
|
|
|
|
|
|
2013-01-21 16:28:34 -05:00
|
|
|
int sha512_init(sha512_context * md);
|
|
|
|
int sha512_final(sha512_context * md, unsigned char *out);
|
|
|
|
int sha512_update(sha512_context * md, const unsigned char *in, size_t inlen);
|
|
|
|
int sha512(const unsigned char *message, size_t message_len, unsigned char *out);
|
2013-01-11 18:54:40 -05:00
|
|
|
|
2015-07-19 12:45:38 -04:00
|
|
|
#endif
|