diff options
Diffstat (limited to 'src/lib/hash/hash.cpp')
-rw-r--r-- | src/lib/hash/hash.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/hash/hash.cpp b/src/lib/hash/hash.cpp index 112554127..c8dd58a66 100644 --- a/src/lib/hash/hash.cpp +++ b/src/lib/hash/hash.cpp @@ -64,6 +64,10 @@ #include <botan/skein_512.h> #endif +#if defined(BOTAN_HAS_SM3) + #include <botan/sm3.h> +#endif + #if defined(BOTAN_HAS_TIGER) #include <botan/tiger.h> #endif @@ -257,6 +261,13 @@ std::unique_ptr<HashFunction> HashFunction::create(const std::string& algo_spec, } #endif +#if defined(BOTAN_HAS_SM3) + if(algo_spec == "SM3") + { + return std::unique_ptr<HashFunction>(new SM3); + } +#endif + #if defined(BOTAN_HAS_WHIRLPOOL) if(req.algo_name() == "Whirlpool") { |