LLVM 22.0.0git
|
A class that wraps the BLAKE3 algorithm. More...
#include "llvm/Support/BLAKE3.h"
Public Member Functions | |
BLAKE3 () | |
void | init () |
Reinitialize the internal state. | |
void | update (ArrayRef< uint8_t > Data) |
Digest more data. | |
void | update (StringRef Str) |
Digest more data. | |
template<size_t NumBytes = LLVM_BLAKE3_OUT_LEN> | |
void | final (BLAKE3Result< NumBytes > &Result) |
Finalize the hasher and put the result in Result . | |
template<size_t NumBytes = LLVM_BLAKE3_OUT_LEN> | |
BLAKE3Result< NumBytes > | final () |
Finalize the hasher and return an output of any length, given in bytes. | |
template<size_t NumBytes = LLVM_BLAKE3_OUT_LEN> | |
BLAKE3Result< NumBytes > | result () |
Return the current output for the digested data since the last call to init(). |
Static Public Member Functions | |
template<size_t NumBytes = LLVM_BLAKE3_OUT_LEN> | |
static BLAKE3Result< NumBytes > | hash (ArrayRef< uint8_t > Data) |
Returns a BLAKE3 hash for the given data. |
|
inline |
|
inline |
Finalize the hasher and return an output of any length, given in bytes.
This doesn't modify the hasher itself, and it's possible to finalize again after adding more input.
Definition at line 67 of file BLAKE3.h.
References llvm_blake3_hasher_finalize().
Referenced by llvm::TruncatedBLAKE3< NumBytes >::final(), llvm::TruncatedBLAKE3< NumBytes >::final(), and result().
|
inline |
Finalize the hasher and put the result in Result
.
This doesn't modify the hasher itself, and it's possible to finalize again after adding more input.
Definition at line 59 of file BLAKE3.h.
References llvm_blake3_hasher_finalize().
|
inlinestatic |
Returns a BLAKE3 hash for the given data.
Definition at line 86 of file BLAKE3.h.
References BLAKE3(), and llvm::Data.
Referenced by llvm::orc::rt_bootstrap::ExecutorSharedMemoryMapperService::reserve(), and llvm::orc::SharedMemoryMapper::reserve().
|
inline |
Reinitialize the internal state.
Definition at line 43 of file BLAKE3.h.
References llvm_blake3_hasher_init().
Referenced by BLAKE3(), and llvm::codeview::GloballyHashedType::hashType().
|
inline |
Return the current output for the digested data since the last call to init().
Other hash functions distinguish between result()
and final()
, with result()
allowing more calls into update()
, but there's no
Definition at line 80 of file BLAKE3.h.
References final().
Referenced by llvm::TruncatedBLAKE3< NumBytes >::result().
Digest more data.
Definition at line 46 of file BLAKE3.h.
References llvm::Data, and llvm_blake3_hasher_update().
Referenced by llvm::codeview::GloballyHashedType::hashType().
|
inline |