summaryrefslogtreecommitdiff
path: root/kit/sha256.h
blob: da05385a0dc6abbc86d10112884ca87e23da71a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef KIT_SHA256_H
#define KIT_SHA256_H

#include "types.h"

#ifdef __cplusplus
extern "C" {
#endif

enum { KIT_SHA256_BLOCK_SIZE = 32 };

typedef struct {
  u8 v[KIT_SHA256_BLOCK_SIZE];
} kit_sha256_hash_t;

kit_sha256_hash_t kit_sha256(i64 size, u8 *data);

#ifdef __cplusplus
}
#endif

#define SHA256_BLOCK_SIZE KIT_SHA256_BLOCK_SIZE
#define sha256_hash_t kit_sha256_hash_t
#define sha256 kit_sha256

#endif