Skip to content

Commit 43323a6

Browse files
authored
Merge pull request #822 from Devsh-Graphics-Programming/ali_blake_reset
blake3: add reset()
2 parents a46b9b0 + 75ffca1 commit 43323a6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/nbl/core/hash/blake.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class NBL_API2 blake3_hasher final
4141

4242
blake3_hasher& update(const void* data, const size_t bytes);
4343

44+
void reset();
45+
4446
template<typename T>
4547
blake3_hasher& operator<<(const T& input) {
4648
update_impl<T>::__call(*this, input);

src/nbl/core/hash/blake.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ blake3_hasher& blake3_hasher::update(const void* data, const size_t bytes)
1414
return *this;
1515
}
1616

17+
void blake3_hasher::reset() {
18+
::blake3_hasher_reset(&m_state);
19+
}
20+
1721
blake3_hasher::operator blake3_hash_t() const
1822
{
1923
blake3_hash_t retval;

0 commit comments

Comments
 (0)