summaryrefslogtreecommitdiffstats
path: root/storage/maria/libmarias3/src/sha256.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/libmarias3/src/sha256.h')
-rw-r--r--storage/maria/libmarias3/src/sha256.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/storage/maria/libmarias3/src/sha256.h b/storage/maria/libmarias3/src/sha256.h
new file mode 100644
index 00000000..45457b9b
--- /dev/null
+++ b/storage/maria/libmarias3/src/sha256.h
@@ -0,0 +1,25 @@
+/*
+ * SHA256 hash implementation and interface functions
+ * Copyright (c) 2003-2016, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef SHA256_H
+#define SHA256_H
+
+#define SHA256_MAC_LEN 32
+
+#include <stdint.h>
+#include <stddef.h>
+#include <string.h>
+
+int hmac_sha256_vector(const uint8_t *key, size_t key_len, size_t num_elem,
+ const uint8_t *addr[], const size_t *len, uint8_t *mac);
+int hmac_sha256(const uint8_t *key, size_t key_len, const uint8_t *data,
+ size_t data_len, uint8_t *mac);
+
+int sha256(const uint8_t *addr, const size_t len, uint8_t *mac);
+
+#endif /* SHA256_H */