diff options
author | lloyd <[email protected]> | 2008-05-24 18:47:11 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-05-24 18:47:11 +0000 |
commit | c4bad5476b30811ad51b1edd3bd873864d423c07 (patch) | |
tree | 94679d6cee3a38da1d64b8f5f671986566ac8a18 /doc/examples/dsa_kgen.cpp | |
parent | ebc67ae27481549a152858f24fff4a7a82ad4e51 (diff) |
Avoid using the global RNG in check_key, instead pass a reference.
Update the examples
Diffstat (limited to 'doc/examples/dsa_kgen.cpp')
-rw-r--r-- | doc/examples/dsa_kgen.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/examples/dsa_kgen.cpp b/doc/examples/dsa_kgen.cpp index 3dc55a443..c078d7fa3 100644 --- a/doc/examples/dsa_kgen.cpp +++ b/doc/examples/dsa_kgen.cpp @@ -21,6 +21,7 @@ This file is in the public domain #include <string> #include <botan/botan.h> #include <botan/dsa.h> +#include <botan/libstate.h> using namespace Botan; int main(int argc, char* argv[]) @@ -39,8 +40,10 @@ int main(int argc, char* argv[]) return 1; } - try { - DSA_PrivateKey key(DL_Group("dsa/jce/1024")); + try + { + DSA_PrivateKey key(DL_Group("dsa/jce/1024"), + global_state().prng_reference()); pub << X509::PEM_encode(key); if(argc == 1) |