LLVM 19.0.0git
Public Member Functions | List of all members
llvm::TruncatedBLAKE3< NumBytes > Class Template Reference

Like BLAKE3 but using a class-level template parameter for specifying the hash size of the final() and result() functions. More...

#include "llvm/Support/BLAKE3.h"

Inheritance diagram for llvm::TruncatedBLAKE3< NumBytes >:
Inheritance graph
[legend]

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().
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::BLAKE3
template<size_t NumBytes = LLVM_BLAKE3_OUT_LEN>
static BLAKE3Result< NumBytes > hash (ArrayRef< uint8_t > Data)
 Returns a BLAKE3 hash for the given data.
 

Detailed Description

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

Like BLAKE3 but using a class-level template parameter for specifying the hash size of the final() and result() functions.

This is useful for using BLAKE3 as the hasher type for HashBuilder with non-default hash sizes.

Definition at line 101 of file BLAKE3.h.

Member Function Documentation

◆ final() [1/2]

template<size_t NumBytes>
BLAKE3Result< NumBytes > llvm::TruncatedBLAKE3< NumBytes >::final ( )
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 111 of file BLAKE3.h.

◆ final() [2/2]

template<size_t NumBytes>
void llvm::TruncatedBLAKE3< NumBytes >::final ( BLAKE3Result< NumBytes > &  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 106 of file BLAKE3.h.

References llvm::BLAKE3::final().

Referenced by llvm::codeview::GloballyHashedType::hashType().

◆ result()

template<size_t NumBytes>
BLAKE3Result< NumBytes > llvm::TruncatedBLAKE3< NumBytes >::result ( )
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 119 of file BLAKE3.h.


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