aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/rsa_dec.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-08 15:36:18 +0000
committerlloyd <[email protected]>2010-03-08 15:36:18 +0000
commit8a47f6f2bbf169a2ea0853234f81b49070c770df (patch)
tree2633ed0d927faf23a067aa88d6cceb9de29f0be4 /doc/examples/rsa_dec.cpp
parent05f6d6c8edec9907778f362c927f368140fee6a2 (diff)
Modify pubkey classes to take names instead of object pointers.
Remove use of look_pk from the source and examples, instead instantiate classes directly.
Diffstat (limited to 'doc/examples/rsa_dec.cpp')
-rw-r--r--doc/examples/rsa_dec.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/examples/rsa_dec.cpp b/doc/examples/rsa_dec.cpp
index 1e789d748..df681d85b 100644
--- a/doc/examples/rsa_dec.cpp
+++ b/doc/examples/rsa_dec.cpp
@@ -1,5 +1,5 @@
/*
-* (C) 2002 Jack Lloyd
+* (C) 2002-2010 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
@@ -16,7 +16,7 @@ same key format as that generated by rsa_kgen.
#include <memory>
#include <botan/botan.h>
-#include <botan/look_pk.h> // for get_kdf
+#include <botan/pubkey.h>
#include <botan/rsa.h>
using namespace Botan;
@@ -75,9 +75,9 @@ int main(int argc, char* argv[])
SecureVector<byte> enc_masterkey = b64_decode(enc_masterkey_str);
- std::auto_ptr<PK_Decryptor> decryptor(get_pk_decryptor(*rsakey,
- "EME1(SHA-1)"));
- SecureVector<byte> masterkey = decryptor->decrypt(enc_masterkey);
+ PK_Decryptor_MR_with_EME decryptor(*rsakey, "EME1(SHA-1)");
+
+ SecureVector<byte> masterkey = decryptor.decrypt(enc_masterkey);
SymmetricKey cast_key = derive_key("CAST", masterkey, 16);
InitializationVector iv = derive_key("IV", masterkey, 8);