From c8d0bff46001bd5636825c5b0bb4c896cb34a4e6 Mon Sep 17 00:00:00 2001 From: J08nY Date: Thu, 21 Nov 2019 19:10:50 +0100 Subject: Initialize. --- pyecsca/codegen/hash/hash.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pyecsca/codegen/hash/hash.h (limited to 'pyecsca/codegen/hash/hash.h') diff --git a/pyecsca/codegen/hash/hash.h b/pyecsca/codegen/hash/hash.h new file mode 100644 index 0000000..9e79b61 --- /dev/null +++ b/pyecsca/codegen/hash/hash.h @@ -0,0 +1,21 @@ +#ifndef HASH_H_ +#define HASH_H_ + +#include + +#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); + +#endif //HASH_H_ \ No newline at end of file -- cgit v1.3.1