aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/comb4p/comb4p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/hash/comb4p/comb4p.cpp')
-rw-r--r--src/lib/hash/comb4p/comb4p.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/hash/comb4p/comb4p.cpp b/src/lib/hash/comb4p/comb4p.cpp
index ece8c9051..f6c20f35e 100644
--- a/src/lib/hash/comb4p/comb4p.cpp
+++ b/src/lib/hash/comb4p/comb4p.cpp
@@ -69,6 +69,14 @@ void Comb4P::clear()
m_hash2->update(0);
}
+std::unique_ptr<HashFunction> Comb4P::copy_state() const
+ {
+ std::unique_ptr<Comb4P> copy(new Comb4P);
+ copy->m_hash1 = m_hash1->copy_state();
+ copy->m_hash2 = m_hash2->copy_state();
+ return std::move(copy);
+ }
+
void Comb4P::add_data(const uint8_t input[], size_t length)
{
m_hash1->update(input, length);