diff options
Diffstat (limited to 'llama.cpp/examples/gguf-hash/deps/sha256/sha256.h')
| -rw-r--r-- | llama.cpp/examples/gguf-hash/deps/sha256/sha256.h | 24 |
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 @@ | |||
| 1 | /* Sha256.h -- SHA-256 Hash | ||
| 2 | 2010-06-11 : Igor Pavlov : Public domain */ | ||
| 3 | |||
| 4 | #ifndef __CRYPTO_SHA256_H | ||
| 5 | #define __CRYPTO_SHA256_H | ||
| 6 | |||
| 7 | #include <stdlib.h> | ||
| 8 | #include <stdint.h> | ||
| 9 | |||
| 10 | #define SHA256_DIGEST_SIZE 32 | ||
| 11 | |||
| 12 | typedef struct sha256_t | ||
| 13 | { | ||
| 14 | uint32_t state[8]; | ||
| 15 | uint64_t count; | ||
| 16 | unsigned char buffer[64]; | ||
| 17 | } sha256_t; | ||
| 18 | |||
| 19 | void sha256_init(sha256_t *p); | ||
| 20 | void sha256_update(sha256_t *p, const unsigned char *data, size_t size); | ||
| 21 | void sha256_final(sha256_t *p, unsigned char *digest); | ||
| 22 | void sha256_hash(unsigned char *buf, const unsigned char *data, size_t size); | ||
| 23 | |||
| 24 | #endif | ||
