LLVM: include/llvm/Support/BLAKE3.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_SUPPORT_BLAKE3_H
14#define LLVM_SUPPORT_BLAKE3_H
15
19
20namespace llvm {
21
22
23
24
25
26
27
28
29
30
31
32
33
34template <size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
36
37
39public:
41
42
44
45
49
50
54
55
56
57
58 template <size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
62
63
64
65
66 template <size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
72
73
74
75
76
77
78
79 template <size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
83
84
85 template <size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
88 Hasher.update(Data);
89 return Hasher.final();
90 }
91
92private:
94};
95
96
97
98
99
100
102public:
103
104
105
107
108
109
110
112
113
114
115
116
117
118
120};
121
122}
123
124#endif
LLVM_C_ABI void llvm_blake3_hasher_finalize(const llvm_blake3_hasher *self, uint8_t *out, size_t out_len)
LLVM_C_ABI void llvm_blake3_hasher_init(llvm_blake3_hasher *self)
LLVM_C_ABI void llvm_blake3_hasher_update(llvm_blake3_hasher *self, const void *input, size_t input_len)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
BLAKE3Result< NumBytes > final()
Finalize the hasher and return an output of any length, given in bytes.
Definition BLAKE3.h:67
void update(StringRef Str)
Digest more data.
Definition BLAKE3.h:51
BLAKE3()
Definition BLAKE3.h:40
static BLAKE3Result< NumBytes > hash(ArrayRef< uint8_t > Data)
Returns a BLAKE3 hash for the given data.
Definition BLAKE3.h:86
BLAKE3Result< NumBytes > result()
Return the current output for the digested data since the last call to init().
Definition BLAKE3.h:80
void init()
Reinitialize the internal state.
Definition BLAKE3.h:43
void update(ArrayRef< uint8_t > Data)
Digest more data.
Definition BLAKE3.h:46
StringRef - Represent a constant reference to a string, i.e.
Like BLAKE3 but using a class-level template parameter for specifying the hash size of the final() an...
Definition BLAKE3.h:101
BLAKE3Result< NumBytes > result()
Return the current output for the digested data since the last call to init().
Definition BLAKE3.h:119
This is an optimization pass for GlobalISel generic memory operations.
std::array< uint8_t, NumBytes > BLAKE3Result
The constant LLVM_BLAKE3_OUT_LEN provides the default output length, 32 bytes, which is recommended f...
Definition BLAKE3.h:35
FunctionAddr VTableAddr uintptr_t uintptr_t Data