Navigation
API > API/Runtime > API/Runtime/Core
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().
| Name | FIoHash |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/IO/IoHash.h |
| Include Path | #include "IO/IoHash.h" |
Syntax
struct FIoHash
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
constexpr FIoHash () |
Construct a zero hash. | IO/IoHash.h | |
FIoHash
(
const ByteArray& Hash |
Construct a hash from an array of 20 bytes. | IO/IoHash.h | |
FIoHash
(
const FBlake3Hash& Hash |
Construct a hash from a BLAKE3-256 hash. | IO/IoHash.h | |
FIoHash
(
FAnsiStringView HexHash |
Construct a hash from a 40-character hex string. | IO/IoHash.h | |
FIoHash
(
FWideStringView HexHash |
IO/IoHash.h | ||
FIoHash
(
FUtf8StringView HexHash |
IO/IoHash.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ByteArray | uint8[20] | IO/IoHash.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Zero | const FIoHash | A zero hash. | IO/IoHash.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Hash | ByteArray | IO/IoHash.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ByteArray & GetBytes () |
Returns a reference to the raw byte array for the hash. | IO/IoHash.h | |
const ByteArray & GetBytes () |
IO/IoHash.h | ||
bool IsZero() |
Returns whether this is a zero hash. | IO/IoHash.h | |
void Reset() |
Reset this to a zero hash. | IO/IoHash.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FIoHash FromView
(
FMemoryView Hash |
Construct a hash from a view of 20 bytes. | IO/IoHash.h | |
static FIoHash HashBuffer
(
FMemoryView View |
Calculate the hash of the buffer. | IO/IoHash.h | |
static FIoHash HashBuffer
(
const FCompositeBuffer& Buffer |
IO/IoHash.h | ||
static FIoHash HashBuffer
(
const void* Data, |
IO/IoHash.h |