diff options
author | lloyd <[email protected]> | 2010-03-04 03:22:35 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 03:22:35 +0000 |
commit | 76f39cc9fe4b2a3354db22f8beaf0c3788578b79 (patch) | |
tree | c25ddaf29f22dc29786487d606d68c2344c46f22 /src/pubkey/dsa | |
parent | da09382f398dcf27a3ffdb82dd9f916ba96567ac (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/dsa')
-rw-r--r-- | src/pubkey/dsa/dsa.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pubkey/dsa/dsa.h b/src/pubkey/dsa/dsa.h index 4c9b708f4..302715222 100644 --- a/src/pubkey/dsa/dsa.h +++ b/src/pubkey/dsa/dsa.h @@ -29,8 +29,13 @@ class BOTAN_DLL DSA_PublicKey : public PK_Verifying_wo_MR_Key, bool verify(const byte[], u32bit, const byte[], u32bit) const; u32bit max_input_bits() const; + DSA_PublicKey(const AlgorithmIdentifier& alg_id, + const MemoryRegion<byte>& key_bits) : + DL_Scheme_PublicKey(alg_id, key_bits, DL_Group::ANSI_X9_57) + { X509_load_hook(); } + + DSA_PublicKey(const DL_Group& group, const BigInt& y); DSA_PublicKey() {} - DSA_PublicKey(const DL_Group&, const BigInt&); protected: DSA_Core core; private: |