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