diff options
author | Daniel Wyatt <[email protected]> | 2017-06-29 12:55:33 -0400 |
---|---|---|
committer | Daniel Wyatt <[email protected]> | 2017-08-04 11:55:55 -0400 |
commit | 638b9e592faeb83dc822af336e6ec8d7eef9b79e (patch) | |
tree | a2f563553df9e6015f4c37f025967b813afd6070 /src/lib/hash/hash.cpp | |
parent | 8a29dc8209c6e93581075bbc4c39ff5bf0cdace5 (diff) |
Add Streebog hash (GOST R 34.11-2012).
Diffstat (limited to 'src/lib/hash/hash.cpp')
-rw-r--r-- | src/lib/hash/hash.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/hash/hash.cpp b/src/lib/hash/hash.cpp index bd162ff2c..04323f88c 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_STREEBOG) + #include <botan/streebog.h> +#endif + #if defined(BOTAN_HAS_SM3) #include <botan/sm3.h> #endif @@ -276,6 +280,17 @@ std::unique_ptr<HashFunction> HashFunction::create(const std::string& algo_spec, } #endif +#if defined(BOTAN_HAS_STREEBOG) + if(algo_spec == "Streebog-256") + { + return std::unique_ptr<HashFunction>(new Streebog_256); + } + if(algo_spec == "Streebog-512") + { + return std::unique_ptr<HashFunction>(new Streebog_512); + } +#endif + #if defined(BOTAN_HAS_SM3) if(algo_spec == "SM3") { |