aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/rfc6979/rfc6979.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/rfc6979/rfc6979.cpp')
-rw-r--r--src/lib/pubkey/rfc6979/rfc6979.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pubkey/rfc6979/rfc6979.cpp b/src/lib/pubkey/rfc6979/rfc6979.cpp
index 1b22fae54..5ba2f844a 100644
--- a/src/lib/pubkey/rfc6979/rfc6979.cpp
+++ b/src/lib/pubkey/rfc6979/rfc6979.cpp
@@ -8,6 +8,7 @@
#include <botan/rfc6979.h>
#include <botan/hmac_drbg.h>
#include <botan/scan_name.h>
+#include <botan/algo_registry.h>
namespace Botan {
@@ -29,9 +30,8 @@ BigInt generate_rfc6979_nonce(const BigInt& x,
const BigInt& h,
const std::string& hash)
{
- Algorithm_Factory& af = global_state().algorithm_factory();
-
- HMAC_DRBG rng(af.make_mac("HMAC(" + hash + ")"), nullptr);
+ auto& macs = Algo_Registry<MessageAuthenticationCode>::global_registry();
+ HMAC_DRBG rng(macs.make("HMAC(" + hash + ")"), nullptr);
const size_t qlen = q.bits();
const size_t rlen = qlen / 8 + (qlen % 8 ? 1 : 0);