aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/hash/hash.h
blob: 7121cd484346a3c16302cd7e42981210c397749f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef HASH_H_
#define HASH_H_

#include <stdint.h>

#define HASH_NONE   0
#define HASH_SHA1   1
#define HASH_SHA224 2
#define HASH_SHA256 3
#define HASH_SHA384 4
#define HASH_SHA512 5

int hash_size(int input_size);

void *hash_new_ctx(void);

void hash_init(void *ctx);

void hash_final(void *ctx, int size, const uint8_t *msg, uint8_t *digest);

void hash_free_ctx(void *ctx);

#endif //HASH_H_