aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/elgamal/elgamal.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-04 03:22:35 +0000
committerlloyd <[email protected]>2010-03-04 03:22:35 +0000
commit76f39cc9fe4b2a3354db22f8beaf0c3788578b79 (patch)
treec25ddaf29f22dc29786487d606d68c2344c46f22 /src/pubkey/elgamal/elgamal.h
parentda09382f398dcf27a3ffdb82dd9f916ba96567ac (diff)
Add a new constructor to each public key algorithm (only the public
keys so far, private keys not changed) that takes an AlgorithmIdentifier and a MemoryRegion<byte>&. This performs the X.509 decoding. It is not possible anymore to create uninitialized PK objects.
Diffstat (limited to 'src/pubkey/elgamal/elgamal.h')
-rw-r--r--src/pubkey/elgamal/elgamal.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pubkey/elgamal/elgamal.h b/src/pubkey/elgamal/elgamal.h
index 93e640f09..305587d93 100644
--- a/src/pubkey/elgamal/elgamal.h
+++ b/src/pubkey/elgamal/elgamal.h
@@ -27,9 +27,14 @@ class BOTAN_DLL ElGamal_PublicKey : public PK_Encrypting_Key,
RandomNumberGenerator& rng) const;
u32bit max_input_bits() const;
- ElGamal_PublicKey() {}
+ ElGamal_PublicKey(const AlgorithmIdentifier& alg_id,
+ const MemoryRegion<byte>& key_bits) :
+ DL_Scheme_PublicKey(alg_id, key_bits, DL_Group::ANSI_X9_42)
+ { X509_load_hook(); }
+
ElGamal_PublicKey(const DL_Group&, const BigInt&);
protected:
+ ElGamal_PublicKey() {}
ELG_Core core;
private:
void X509_load_hook();