aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/hash/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/codegen/hash/hash.h')
-rw-r--r--pyecsca/codegen/hash/hash.h21
1 files changed, 21 insertions, 0 deletions
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 <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);
+
+#endif //HASH_H_ \ No newline at end of file