aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/rsa_dec.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-27 20:21:45 +0000
committerlloyd <[email protected]>2008-06-27 20:21:45 +0000
commit3d0a9fd636e5ca91fcf8f5c0e13dcf659940b564 (patch)
tree4ce02817eac4c55b27cc75106adce227b4461220 /doc/examples/rsa_dec.cpp
parent964dbc067992211e7d566c881de2c7330f46bef2 (diff)
Update more of the examples
Diffstat (limited to 'doc/examples/rsa_dec.cpp')
-rw-r--r--doc/examples/rsa_dec.cpp6
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)
{