diff options
author | lloyd <[email protected]> | 2014-12-28 13:23:40 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-12-28 13:23:40 +0000 |
commit | 6322dc69fcf9f3effed4e51de90b3f5b163db47e (patch) | |
tree | 6cc5a7b12b5a6648f53b4b22003f9a28b425d1fa /src/tests/test_rsa.cpp | |
parent | 69d883e83569dd81f02fbbd7dfbdcfc5a3918d49 (diff) |
All tests now share an RNG. Uses system RNG if available
Diffstat (limited to 'src/tests/test_rsa.cpp')
-rw-r--r-- | src/tests/test_rsa.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tests/test_rsa.cpp b/src/tests/test_rsa.cpp index 28320ddb0..f1ec8e603 100644 --- a/src/tests/test_rsa.cpp +++ b/src/tests/test_rsa.cpp @@ -1,7 +1,7 @@ #include "tests.h" #include "test_pubkey.h" -#include <botan/auto_rng.h> + #include <botan/pubkey.h> #include <botan/rsa.h> #include <botan/hex.h> @@ -20,7 +20,7 @@ size_t rsaes_kat(const std::string& e, const std::string& nonce, const std::string& output) { - AutoSeeded_RNG rng; + auto& rng = test_rng(); RSA_PrivateKey privkey(rng, BigInt(p), BigInt(q), BigInt(e)); @@ -43,7 +43,7 @@ size_t rsa_sig_kat(const std::string& e, const std::string& nonce, const std::string& output) { - AutoSeeded_RNG rng; + auto& rng = test_rng(); RSA_PrivateKey privkey(rng, BigInt(p), BigInt(q), BigInt(e)); @@ -64,8 +64,6 @@ size_t rsa_sig_verify(const std::string& e, std::string padding, const std::string& signature) { - AutoSeeded_RNG rng; - BigInt e_bn(e); BigInt n_bn(n); |