13#ifndef LLVM_SUPPORT_BLAKE3_H
14#define LLVM_SUPPORT_BLAKE3_H
34template <
size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
58 template <
size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
66 template <
size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
79 template <
size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
81 return final<NumBytes>();
85 template <
size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
89 return Hasher.
final<NumBytes>();
void llvm_blake3_hasher_finalize(const llvm_blake3_hasher *self, uint8_t *out, size_t out_len)
void llvm_blake3_hasher_update(llvm_blake3_hasher *self, const void *input, size_t input_len)
void llvm_blake3_hasher_init(llvm_blake3_hasher *self)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A class that wraps the BLAKE3 algorithm.
void final(BLAKE3Result< NumBytes > &Result)
Finalize the hasher and put the result in Result.
BLAKE3Result< NumBytes > final()
Finalize the hasher and return an output of any length, given in bytes.
void update(StringRef Str)
Digest more data.
static BLAKE3Result< NumBytes > hash(ArrayRef< uint8_t > Data)
Returns a BLAKE3 hash for the given data.
BLAKE3Result< NumBytes > result()
Return the current output for the digested data since the last call to init().
void init()
Reinitialize the internal state.
void update(ArrayRef< uint8_t > Data)
Digest more data.
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...
BLAKE3Result< NumBytes > result()
Return the current output for the digested data since the last call to init().
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...