aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ecdh/ecdh.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/ecdh/ecdh.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/ecdh/ecdh.h')
-rw-r--r--src/pubkey/ecdh/ecdh.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pubkey/ecdh/ecdh.h b/src/pubkey/ecdh/ecdh.h
index 630237edf..10cf75de0 100644
--- a/src/pubkey/ecdh/ecdh.h
+++ b/src/pubkey/ecdh/ecdh.h
@@ -21,11 +21,10 @@ class BOTAN_DLL ECDH_PublicKey : public virtual EC_PublicKey
{
public:
- /**
- * Default constructor. Use this one if you want to later fill
- * this object with data from an encoded key.
- */
- ECDH_PublicKey() {}
+
+ ECDH_PublicKey(const AlgorithmIdentifier& alg_id,
+ const MemoryRegion<byte>& key_bits) :
+ EC_PublicKey(alg_id, key_bits) {}
/**
* Construct a public key from a given public point.
@@ -49,6 +48,8 @@ class BOTAN_DLL ECDH_PublicKey : public virtual EC_PublicKey
* @result the maximum number of input bits
*/
u32bit max_input_bits() const { return domain().get_order().bits(); }
+ protected:
+ ECDH_PublicKey() {}
};
/**