aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/hash/none.c
diff options
context:
space:
mode:
authorJ08nY2019-11-21 19:10:50 +0100
committerJ08nY2019-11-21 19:10:50 +0100
commitc8d0bff46001bd5636825c5b0bb4c896cb34a4e6 (patch)
tree2b3029c6ca37e56e86daa34069ab39da3b1a5400 /pyecsca/codegen/hash/none.c
downloadpyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.tar.gz
pyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.tar.zst
pyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.zip
Initialize.
Diffstat (limited to 'pyecsca/codegen/hash/none.c')
-rw-r--r--pyecsca/codegen/hash/none.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/pyecsca/codegen/hash/none.c b/pyecsca/codegen/hash/none.c
new file mode 100644
index 0000000..79690e8
--- /dev/null
+++ b/pyecsca/codegen/hash/none.c
@@ -0,0 +1,20 @@
+#include "hash.h"
+
+#include <string.h>
+#include <stdint.h>
+
+int hash_size(int input_size) {
+ return input_size;
+}
+
+void *hash_new_ctx(void) {
+ return NULL;
+}
+
+void hash_init(void *ctx) {
+
+}
+
+void hash_final(void *ctx, int size, const uint8_t *msg, uint8_t *digest) {
+ memcpy(digest, msg, size);
+} \ No newline at end of file