char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Xuan-Son Nguyenmtmd: use sha256 for input hashing (#27274)ed1c3a20f

char/aliceai-t5-moe
689 B48 linesraw
1#ifndef SHA1_H
2#define SHA1_H
3
4/*
5   SHA-1 in C
6   By Steve Reid <steve@edmweb.com>
7   100% Public Domain
8 */
9
10#include "stdint.h"
11
12namespace vendor_hash {
13
14typedef struct
15{
16    uint32_t state[5];
17    uint32_t count[2];
18    unsigned char buffer[64];
19} SHA1_CTX;
20
21void SHA1Transform(
22    uint32_t state[5],
23    const unsigned char buffer[64]
24    );
25
26void SHA1Init(
27    SHA1_CTX * context
28    );
29
30void SHA1Update(
31    SHA1_CTX * context,
32    const unsigned char *data,
33    uint32_t len
34    );
35
36void SHA1Final(
37    unsigned char digest[20],
38    SHA1_CTX * context
39    );
40
41void SHA1(
42    char *hash_out,
43    const char *str,
44    uint32_t len);
45
46} // namespace vendor_hash
47
48#endif /* SHA1_H */