summaryrefslogtreecommitdiff
path: root/llama.cpp/examples/gguf-hash/deps/sha256/sha256.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-02-12 20:57:17 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-02-12 20:57:17 +0100
commitb333b06772c89d96aacb5490d6a219fba7c09cc6 (patch)
tree211df60083a5946baa2ed61d33d8121b7e251b06 /llama.cpp/examples/gguf-hash/deps/sha256/sha256.h
downloadllmnpc-b333b06772c89d96aacb5490d6a219fba7c09cc6.tar.gz
Engage!
Diffstat (limited to 'llama.cpp/examples/gguf-hash/deps/sha256/sha256.h')
-rw-r--r--llama.cpp/examples/gguf-hash/deps/sha256/sha256.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/llama.cpp/examples/gguf-hash/deps/sha256/sha256.h b/llama.cpp/examples/gguf-hash/deps/sha256/sha256.h
new file mode 100644
index 0000000..21657e6
--- /dev/null
+++ b/llama.cpp/examples/gguf-hash/deps/sha256/sha256.h
@@ -0,0 +1,24 @@
+/* Sha256.h -- SHA-256 Hash
+2010-06-11 : Igor Pavlov : Public domain */
+
+#ifndef __CRYPTO_SHA256_H
+#define __CRYPTO_SHA256_H
+
+#include <stdlib.h>
+#include <stdint.h>
+
+#define SHA256_DIGEST_SIZE 32
+
+typedef struct sha256_t
+{
+ uint32_t state[8];
+ uint64_t count;
+ unsigned char buffer[64];
+} sha256_t;
+
+void sha256_init(sha256_t *p);
+void sha256_update(sha256_t *p, const unsigned char *data, size_t size);
+void sha256_final(sha256_t *p, unsigned char *digest);
+void sha256_hash(unsigned char *buf, const unsigned char *data, size_t size);
+
+#endif