From cbcebfaad9ab6dc22186e93d259c6beed7fcff88 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 27 Jun 2008 19:29:19 +0000 Subject: Update some of the examples for the recent API changes --- doc/examples/rsa_kgen.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc/examples/rsa_kgen.cpp') diff --git a/doc/examples/rsa_kgen.cpp b/doc/examples/rsa_kgen.cpp index 13d602d66..7230e7a4a 100644 --- a/doc/examples/rsa_kgen.cpp +++ b/doc/examples/rsa_kgen.cpp @@ -13,10 +13,10 @@ This file is in the public domain #include #include #include +#include #include #include -#include using namespace Botan; int main(int argc, char* argv[]) @@ -45,13 +45,14 @@ int main(int argc, char* argv[]) try { - RSA_PrivateKey key(bits, global_state().prng_reference()); + std::auto_ptr rng(make_rng()); + RSA_PrivateKey key(*rng, bits); pub << X509::PEM_encode(key); if(argc == 2) priv << PKCS8::PEM_encode(key); else - priv << PKCS8::PEM_encode(key, argv[2]); + priv << PKCS8::PEM_encode(key, *rng, argv[2]); } catch(std::exception& e) { -- cgit v1.2.3