aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/iohash.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/zencore/include/zencore/iohash.h b/zencore/include/zencore/iohash.h
index 4eac7e328..2c0c7d128 100644
--- a/zencore/include/zencore/iohash.h
+++ b/zencore/include/zencore/iohash.h
@@ -32,6 +32,13 @@ struct IoHash
return Io;
}
+ static IoHash FromBLAKE3(const BLAKE3& Blake3)
+ {
+ IoHash Io;
+ memcpy(Io.Hash, Blake3.Hash, sizeof Io.Hash);
+ return Io;
+ }
+
static IoHash HashMemory(const void* data, size_t byteCount);
static IoHash HashMemory(MemoryView Data) { return HashMemory(Data.GetData(), Data.GetSize()); }
static IoHash FromHexString(const char* string);