aboutsummaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/math')
-rw-r--r--src/math/numbertheory/dsa_gen.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/math/numbertheory/dsa_gen.cpp b/src/math/numbertheory/dsa_gen.cpp
index 14f62dab3..6f4a7cefa 100644
--- a/src/math/numbertheory/dsa_gen.cpp
+++ b/src/math/numbertheory/dsa_gen.cpp
@@ -4,7 +4,8 @@
*************************************************/
#include <botan/numthry.h>
-#include <botan/lookup.h>
+#include <botan/libstate.h>
+#include <botan/hash.h>
#include <botan/parsing.h>
#include <algorithm>
#include <memory>
@@ -50,7 +51,10 @@ bool generate_dsa_primes(RandomNumberGenerator& rng,
"Generating a DSA parameter set with a " + to_string(qbits) +
"long q requires a seed at least as many bits long");
- std::auto_ptr<HashFunction> hash(get_hash("SHA-" + to_string(qbits)));
+ Algorithm_Factory& af = global_state().algo_factory();
+
+ std::auto_ptr<HashFunction> hash(
+ af.make_hash_function("SHA-" + to_string(qbits)));
const u32bit HASH_SIZE = hash->OUTPUT_LENGTH;