diff --git a/include/nbl/core/hash/blake.h b/include/nbl/core/hash/blake.h index f56e0b12e7..82019327cb 100644 --- a/include/nbl/core/hash/blake.h +++ b/include/nbl/core/hash/blake.h @@ -41,6 +41,8 @@ class NBL_API2 blake3_hasher final blake3_hasher& update(const void* data, const size_t bytes); + void reset(); + template blake3_hasher& operator<<(const T& input) { update_impl::__call(*this, input); diff --git a/src/nbl/core/hash/blake.cpp b/src/nbl/core/hash/blake.cpp index 8bb961d9d0..043c28698d 100644 --- a/src/nbl/core/hash/blake.cpp +++ b/src/nbl/core/hash/blake.cpp @@ -14,6 +14,10 @@ blake3_hasher& blake3_hasher::update(const void* data, const size_t bytes) return *this; } +void blake3_hasher::reset() { + ::blake3_hasher_reset(&m_state); +} + blake3_hasher::operator blake3_hash_t() const { blake3_hash_t retval;