diff options
Diffstat (limited to 'zencore')
| -rw-r--r-- | zencore/include/zencore/blake3.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zencore/include/zencore/blake3.h b/zencore/include/zencore/blake3.h index bf4adb811..b31b710a7 100644 --- a/zencore/include/zencore/blake3.h +++ b/zencore/include/zencore/blake3.h @@ -6,6 +6,8 @@ #include <compare> #include <cstring> +#include <zencore/memory.h> + namespace zen { class CompositeBuffer; @@ -46,9 +48,10 @@ struct BLAKE3Stream { BLAKE3Stream(); - void Reset(); /// Begin streaming hash compute (not needed on freshly constructed instance) - BLAKE3Stream& Append(const void* data, size_t byteCount); /// Append another chunk - BLAKE3 GetHash(); /// Obtain final hash. If you wish to reuse the instance call reset() + void Reset(); // Begin streaming hash compute (not needed on freshly constructed instance) + BLAKE3Stream& Append(const void* data, size_t byteCount); // Append another chunk + BLAKE3Stream& Append(MemoryView DataView) { return Append(DataView.GetData(), DataView.GetSize()); } // Append another chunk + BLAKE3 GetHash(); // Obtain final hash. If you wish to reuse the instance call reset() private: alignas(16) uint8_t m_HashState[2048]; |