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/dh | |
parent | de89566f633d5ed807ca57a59cc1071f79fdded3 (diff) |
Add similar decoding constructors to the private keys
Diffstat (limited to 'src/pubkey/dh')
-rw-r--r-- | src/pubkey/dh/dh.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pubkey/dh/dh.h b/src/pubkey/dh/dh.h index 7b81008a3..638553db4 100644 --- a/src/pubkey/dh/dh.h +++ b/src/pubkey/dh/dh.h @@ -57,11 +57,13 @@ class BOTAN_DLL DH_PrivateKey : public DH_PublicKey, MemoryVector<byte> public_value() const; - /** - * Construct an uninitialized key. Use this constructor if you wish - * to decode an encoded key into the new instance. - */ - DH_PrivateKey() {} + DH_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); + } /** * Construct a private key with predetermined value. |