diff options
author | lloyd <[email protected]> | 2015-01-31 16:18:09 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-01-31 16:18:09 +0000 |
commit | fd3016d10124d2b7ccd7bc885235f2e407d73800 (patch) | |
tree | e237b54c3a8d465c893a012157d9d52014eaccc9 /src/lib/pubkey | |
parent | 00c9b3f4834603946065c15b9b2e9fa5e973b979 (diff) |
Use registry also for KDF, EMSA, and EME
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r-- | src/lib/pubkey/rfc6979/rfc6979.cpp | 6 |
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); |