aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/comb4p/comb4p.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-05-22 22:18:21 -0400
committerJack Lloyd <[email protected]>2017-05-22 22:18:21 -0400
commitcb91be3967edab3688b744e150a98d96db89b2fd (patch)
treead818dc31b2a6b2c1fb894cbf3cfcf2a70213bca /src/lib/hash/comb4p/comb4p.cpp
parent22797129ff2f746f96d3725ab45e043c506664f3 (diff)
parentb136d4e7ca350bb388a1a6d638b1010a2b1e5b73 (diff)
Merge GH #1056 Add HashFunction::copy_state and port to OpenSSL 1.1.0
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);