diff options
Diffstat (limited to 'doc/examples/rsa_dec.cpp')
-rw-r--r-- | doc/examples/rsa_dec.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/examples/rsa_dec.cpp b/doc/examples/rsa_dec.cpp index 6f71e2831..910d07adf 100644 --- a/doc/examples/rsa_dec.cpp +++ b/doc/examples/rsa_dec.cpp @@ -32,8 +32,10 @@ int main(int argc, char* argv[]) return 1; } - try { - std::auto_ptr<PKCS8_PrivateKey> key(PKCS8::load_key(argv[1], argv[3])); + try + { + std::auto_ptr<RandomNumberGenerator> rng(make_rng()); + std::auto_ptr<PKCS8_PrivateKey> key(PKCS8::load_key(argv[1], *rng, argv[3])); RSA_PrivateKey* rsakey = dynamic_cast<RSA_PrivateKey*>(key.get()); if(!rsakey) { |