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 /checks/pk.cpp | |
parent | ebc67ae27481549a152858f24fff4a7a82ad4e51 (diff) |
Avoid using the global RNG in check_key, instead pass a reference.
Update the examples
Diffstat (limited to 'checks/pk.cpp')
-rw-r--r-- | checks/pk.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/checks/pk.cpp b/checks/pk.cpp index 72e135715..0deab355c 100644 --- a/checks/pk.cpp +++ b/checks/pk.cpp @@ -660,31 +660,31 @@ void do_pk_keygen_tests() std::cout << "Testing PK key generation: " << std::flush; /* Putting each key in a block reduces memory pressure, speeds it up */ -#define IF_SIG_KEY(TYPE, BITS) \ - { \ - TYPE key(BITS, global_state().prng_reference()); \ - key.check_key(true); \ - std::cout << '.' << std::flush; \ +#define IF_SIG_KEY(TYPE, BITS) \ + { \ + TYPE key(BITS, global_state().prng_reference()); \ + key.check_key(global_state().prng_reference(), true); \ + std::cout << '.' << std::flush; \ } #define DL_SIG_KEY(TYPE, GROUP) \ { \ TYPE key(DL_Group(GROUP), global_state().prng_reference()); \ - key.check_key(true); \ - std::cout << '.' << std::flush; \ + key.check_key(global_state().prng_reference(), true); \ + std::cout << '.' << std::flush; \ } #define DL_ENC_KEY(TYPE, GROUP) \ { \ TYPE key(DL_Group(GROUP), global_state().prng_reference()); \ - key.check_key(true); \ - std::cout << '.' << std::flush; \ + key.check_key(global_state().prng_reference(), true); \ + std::cout << '.' << std::flush; \ } #define DL_KEY(TYPE, GROUP) \ { \ TYPE key(DL_Group(GROUP), global_state().prng_reference()); \ - key.check_key(true); \ + key.check_key(global_state().prng_reference(), true); \ std::cout << '.' << std::flush; \ } |