summaryrefslogtreecommitdiffstats
path: root/storage/maria/libmarias3/src/sha256.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /storage/maria/libmarias3/src/sha256.h
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 */