UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FIoHash Struct Reference

#include <IoHash.h>

Public Types

using ByteArray = uint8[20]
 

Public Member Functions

constexpr FIoHash ()=default
 
 FIoHash (const ByteArray &Hash)
 
 FIoHash (const FBlake3Hash &Hash)
 
 FIoHash (FAnsiStringView HexHash)
 
 FIoHash (FWideStringView HexHash)
 
 FIoHash (FUtf8StringView HexHash)
 
void Reset ()
 
bool IsZero () const
 
ByteArrayGetBytes ()
 
const ByteArrayGetBytes () const
 

Static Public Member Functions

static FIoHash FromView (FMemoryView Hash)
 
static FIoHash HashBuffer (FMemoryView View)
 
static FIoHash HashBuffer (const void *Data, uint64 Size)
 
static FIoHash HashBuffer (const FCompositeBuffer &Buffer)
 

Static Public Attributes

static const FIoHash Zero
 

Friends

bool operator== (const FIoHash &A, const FIoHash &B)
 
bool operator!= (const FIoHash &A, const FIoHash &B)
 
bool operator< (const FIoHash &A, const FIoHash &B)
 
uint32 GetTypeHash (const FIoHash &Value)
 
FArchiveoperator<< (FArchive &Ar, FIoHash &InHash)
 

Detailed Description

Stores a BLAKE3-160 hash, taken from the first 20 bytes of a BLAKE3-256 hash.

The BLAKE3 hash function was selected for its high performance and its ability to parallelize. Only the leading 160 bits of the 256-bit hash are used, to provide strong collision resistance while minimizing the size of the hash.

When the data to hash is not in a contiguous region of memory, use FIoHashBuilder to hash data in blocks with FIoHashBuilder::Update(Block) followed by FIoHashBuilder::Finalize().

Member Typedef Documentation

◆ ByteArray

Constructor & Destructor Documentation

◆ FIoHash() [1/6]

constexpr FIoHash::FIoHash ( )
constexprdefault

Construct a zero hash.

◆ FIoHash() [2/6]

FIoHash::FIoHash ( const ByteArray Hash)
inlineexplicit

Construct a hash from an array of 20 bytes.

◆ FIoHash() [3/6]

FIoHash::FIoHash ( const FBlake3Hash Hash)
inline

Construct a hash from a BLAKE3-256 hash.

◆ FIoHash() [4/6]

FIoHash::FIoHash ( FAnsiStringView  HexHash)
inlineexplicit

Construct a hash from a 40-character hex string.

◆ FIoHash() [5/6]

FIoHash::FIoHash ( FWideStringView  HexHash)
inlineexplicit

◆ FIoHash() [6/6]

FIoHash::FIoHash ( FUtf8StringView  HexHash)
inlineexplicit

Member Function Documentation

◆ FromView()

FIoHash FIoHash::FromView ( FMemoryView  Hash)
inlinestatic

Construct a hash from a view of 20 bytes.

◆ GetBytes() [1/2]

ByteArray & FIoHash::GetBytes ( )
inline

Returns a reference to the raw byte array for the hash.

◆ GetBytes() [2/2]

const ByteArray & FIoHash::GetBytes ( ) const
inline

◆ HashBuffer() [1/3]

FIoHash FIoHash::HashBuffer ( const FCompositeBuffer Buffer)
inlinestatic

◆ HashBuffer() [2/3]

FIoHash FIoHash::HashBuffer ( const void Data,
uint64  Size 
)
inlinestatic

◆ HashBuffer() [3/3]

FIoHash FIoHash::HashBuffer ( FMemoryView  View)
inlinestatic

Calculate the hash of the buffer.

◆ IsZero()

bool FIoHash::IsZero ( ) const
inline

Returns whether this is a zero hash.

◆ Reset()

void FIoHash::Reset ( )
inline

Reset this to a zero hash.

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( const FIoHash Value)
friend

◆ operator!=

bool operator!= ( const FIoHash A,
const FIoHash B 
)
friend

◆ operator<

bool operator< ( const FIoHash A,
const FIoHash B 
)
friend

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FIoHash InHash 
)
friend

◆ operator==

bool operator== ( const FIoHash A,
const FIoHash B 
)
friend

Member Data Documentation

◆ Zero

const FIoHash FIoHash::Zero
inlinestatic

A zero hash.


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