diff options
Diffstat (limited to 'src/tests/test_rfc6979.cpp')
-rw-r--r-- | src/tests/test_rfc6979.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tests/test_rfc6979.cpp b/src/tests/test_rfc6979.cpp index 30846c9e3..1b8e91377 100644 --- a/src/tests/test_rfc6979.cpp +++ b/src/tests/test_rfc6979.cpp @@ -11,6 +11,8 @@ #include <botan/hex.h> #endif +#include <botan/hash.h> + namespace Botan_Tests { namespace { @@ -31,6 +33,15 @@ class RFC6979_KAT_Tests : public Text_Based_Test const BigInt K = get_req_bn(vars, "K"); Test::Result result("RFC 6979 nonce generation"); + + auto hash_func = Botan::HashFunction::create(hash); + + if(!hash_func) + { + result.test_note("Skipping due to missing: " + hash); + return result; + } + result.test_eq("vector matches", Botan::generate_rfc6979_nonce(X, Q, H, hash), K); Botan::RFC6979_Nonce_Generator gen(hash, Q, X); |