aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/elgamal
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 /src/pubkey/elgamal
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 'src/pubkey/elgamal')
-rw-r--r--src/pubkey/elgamal/elgamal.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pubkey/elgamal/elgamal.cpp b/src/pubkey/elgamal/elgamal.cpp
index 2abd769e5..6b919d916 100644
--- a/src/pubkey/elgamal/elgamal.cpp
+++ b/src/pubkey/elgamal/elgamal.cpp
@@ -8,7 +8,6 @@
#include <botan/elgamal.h>
#include <botan/numthry.h>
#include <botan/keypair.h>
-#include <botan/look_pk.h>
#include <botan/internal/workfactor.h>
namespace Botan {
@@ -66,10 +65,12 @@ bool ElGamal_PrivateKey::check_key(RandomNumberGenerator& rng,
try
{
+ PK_Encryptor_MR_with_EME this_encryptor(*this, "EME1(SHA-1)");
+ PK_Decryptor_MR_with_EME this_decryptor(*this, "EME1(SHA-1)");
+
KeyPair::check_key(rng,
- get_pk_encryptor(*this, "EME1(SHA-1)"),
- get_pk_decryptor(*this, "EME1(SHA-1)")
- );
+ this_encryptor,
+ this_decryptor);
}
catch(Self_Test_Failure)
{