20 lines
340 B
C
20 lines
340 B
C
#ifndef SHA256_H
|
|
#define SHA256_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
struct sha256_ctx
|
|
{
|
|
uint32_t state[8];
|
|
uint64_t count;
|
|
uint8_t buf[64];
|
|
};
|
|
|
|
void sha256_init(void *ctx);
|
|
void sha256_update(void *ctx, const uint8_t *data, size_t len);
|
|
void sha256_final(void *ctx, uint8_t *out);
|
|
|
|
extern const uint32_t g_sha256_K[64];
|
|
|
|
#endif
|