diff options
Diffstat (limited to 'doc/examples/rsa_kgen.cpp')
-rw-r--r-- | doc/examples/rsa_kgen.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/examples/rsa_kgen.cpp b/doc/examples/rsa_kgen.cpp index c3942971b..ed8e786fe 100644 --- a/doc/examples/rsa_kgen.cpp +++ b/doc/examples/rsa_kgen.cpp @@ -45,16 +45,15 @@ int main(int argc, char* argv[]) try { - std::auto_ptr<RandomNumberGenerator> rng( - RandomNumberGenerator::make_rng()); + AutoSeeded_RNG rng; - RSA_PrivateKey key(*rng, bits); + RSA_PrivateKey key(rng, bits); pub << X509::PEM_encode(key); if(argc == 2) priv << PKCS8::PEM_encode(key); else - priv << PKCS8::PEM_encode(key, *rng, argv[2]); + priv << PKCS8::PEM_encode(key, rng, argv[2]); } catch(std::exception& e) { |