LLVM: llvm::TruncatedBLAKE3< NumBytes > Class Template Reference (original) (raw)

Like [BLAKE3](classllvm%5F1%5F1BLAKE3.html "A class that wraps the BLAKE3 algorithm.") but using a class-level template parameter for specifying the hash size of the [final()](#a74a099d51430f54417d27af6f552d183 "Finalize the hasher and return an output of any length, given in bytes.") and [result()](#adda4f5df8b748e9f3c27dc9872b52330 "Return the current output for the digested data since the last call to init().") functions. More...

#include "[llvm/Support/BLAKE3.h](BLAKE3%5F8h%5Fsource.html)"

Public Member Functions
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.
BLAKE3Result< NumBytes > result ()
Return the current output for the digested data since the last call to init().
Public Member Functions inherited from llvm::BLAKE3
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().

template<size_t NumBytes>
class llvm::TruncatedBLAKE3< NumBytes >

Like [BLAKE3](classllvm%5F1%5F1BLAKE3.html "A class that wraps the BLAKE3 algorithm.") but using a class-level template parameter for specifying the hash size of the [final()](#a74a099d51430f54417d27af6f552d183 "Finalize the hasher and return an output of any length, given in bytes.") and [result()](#adda4f5df8b748e9f3c27dc9872b52330 "Return the current output for the digested data since the last call to init().") functions.

This is useful for using BLAKE3 as the hasher type for [HashBuilder](classllvm%5F1%5F1HashBuilder.html "Interface to help hash various types through a hasher type.") with non-default hash sizes.

Definition at line 101 of file BLAKE3.h.

final() [1/2]

template<size_t NumBytes>

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 111 of file BLAKE3.h.

References llvm::BLAKE3::final().

final() [2/2]

template<size_t NumBytes>

result()

template<size_t NumBytes>

Return the current output for the digested data since the last call to init().

Other hash functions distinguish between [result()](#adda4f5df8b748e9f3c27dc9872b52330 "Return the current output for the digested data since the last call to init().") and [final()](#a74a099d51430f54417d27af6f552d183 "Finalize the hasher and return an output of any length, given in bytes."), with [result()](#adda4f5df8b748e9f3c27dc9872b52330 "Return the current output for the digested data since the last call to init().") allowing more calls into [update()](classllvm%5F1%5F1BLAKE3.html#ad247de2450380eeba2fab0e794d5e44f "Digest more data."), but there's no

Definition at line 119 of file BLAKE3.h.

References llvm::BLAKE3::result().


The documentation for this class was generated from the following file: