aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/sm3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/hash/sm3')
-rw-r--r--src/lib/hash/sm3/sm3.cpp5
-rw-r--r--src/lib/hash/sm3/sm3.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/hash/sm3/sm3.cpp b/src/lib/hash/sm3/sm3.cpp
index a64a9a5e7..c2eeb4cdf 100644
--- a/src/lib/hash/sm3/sm3.cpp
+++ b/src/lib/hash/sm3/sm3.cpp
@@ -9,6 +9,11 @@
namespace Botan {
+std::unique_ptr<HashFunction> SM3::copy_state() const
+ {
+ return std::unique_ptr<HashFunction>(new SM3(*this));
+ }
+
namespace {
const uint32_t SM3_IV[] = {
diff --git a/src/lib/hash/sm3/sm3.h b/src/lib/hash/sm3/sm3.h
index c5dacdf3a..dd76ab4d0 100644
--- a/src/lib/hash/sm3/sm3.h
+++ b/src/lib/hash/sm3/sm3.h
@@ -26,6 +26,7 @@ class BOTAN_DLL SM3 final : public MDx_HashFunction
std::string name() const override { return "SM3"; }
size_t output_length() const override { return SM3_DIGEST_BYTES; }
HashFunction* clone() const override { return new SM3; }
+ std::unique_ptr<HashFunction> copy_state() const override;
void clear() override;