blob: 467fb22d7f790697d8d1be29e24c93cd432d361f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef SHA256_H
#define SHA256_H
#include <sys/types.h>
#include <stdint.h>
typedef struct
{
size_t total[2];
uint32_t state[8];
uint8_t buffer[64];
}
sha256_context;
typedef uint8_t sha256_digest_t[32];
void sha256_starts( sha256_context *ctx );
void sha256_update( sha256_context *ctx, const uint8_t *input, size_t length );
void sha256_finish( sha256_context *ctx, sha256_digest_t digest );
#endif /* SHA256_H */
|