diff options
author | lloyd <[email protected]> | 2010-03-04 03:49:35 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 03:49:35 +0000 |
commit | fe9aa5acece6c004f2c1c1aa4b23d7c44207672f (patch) | |
tree | 56bf2fc8378d965138e29074c23f645ed5d1a947 /src/pubkey/elgamal | |
parent | de89566f633d5ed807ca57a59cc1071f79fdded3 (diff) |
Add similar decoding constructors to the private keys
Diffstat (limited to 'src/pubkey/elgamal')
-rw-r--r-- | src/pubkey/elgamal/elgamal.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pubkey/elgamal/elgamal.h b/src/pubkey/elgamal/elgamal.h index 305587d93..92adf108d 100644 --- a/src/pubkey/elgamal/elgamal.h +++ b/src/pubkey/elgamal/elgamal.h @@ -52,7 +52,14 @@ class BOTAN_DLL ElGamal_PrivateKey : public ElGamal_PublicKey, bool check_key(RandomNumberGenerator& rng, bool) const; - ElGamal_PrivateKey() {} + ElGamal_PrivateKey(const AlgorithmIdentifier& alg_id, + const MemoryRegion<byte>& key_bits, + RandomNumberGenerator& rng) : + DL_Scheme_PrivateKey(alg_id, key_bits, DL_Group::ANSI_X9_42) + { + PKCS8_load_hook(rng); + } + ElGamal_PrivateKey(RandomNumberGenerator&, const DL_Group&, const BigInt& = 0); private: |