summaryrefslogtreecommitdiff
path: root/kit/sha256.h
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-07-14 21:12:37 +0200
committerMitya Selivanov <automainint@guattari.tech>2024-07-14 21:12:37 +0200
commit30740ca4131d1f574718262451b4410207dc8d4e (patch)
treefc88b16a216079397ad85b9c6b1a1c1c5712a814 /kit/sha256.h
parent5e3c99bb1cf1d03ea006300121265571f5008fd2 (diff)
downloadsaw-30740ca4131d1f574718262451b4410207dc8d4e.zip
Reworking the build system
Diffstat (limited to 'kit/sha256.h')
-rw-r--r--kit/sha256.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/kit/sha256.h b/kit/sha256.h
new file mode 100644
index 0000000..da05385
--- /dev/null
+++ b/kit/sha256.h
@@ -0,0 +1,26 @@
+#ifndef KIT_SHA256_H
+#define KIT_SHA256_H
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum { KIT_SHA256_BLOCK_SIZE = 32 };
+
+typedef struct {
+ u8 v[KIT_SHA256_BLOCK_SIZE];
+} kit_sha256_hash_t;
+
+kit_sha256_hash_t kit_sha256(i64 size, u8 *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#define SHA256_BLOCK_SIZE KIT_SHA256_BLOCK_SIZE
+#define sha256_hash_t kit_sha256_hash_t
+#define sha256 kit_sha256
+
+#endif