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/rw | |
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/rw')
-rw-r--r-- | src/pubkey/rw/rw.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pubkey/rw/rw.h b/src/pubkey/rw/rw.h index 900e5ebda..ecc29ed6c 100644 --- a/src/pubkey/rw/rw.h +++ b/src/pubkey/rw/rw.h @@ -23,9 +23,13 @@ class BOTAN_DLL RW_PublicKey : public PK_Verifying_with_MR_Key, SecureVector<byte> verify(const byte[], u32bit) const; - RW_PublicKey() {} - RW_PublicKey(const BigInt&, const BigInt&); + RW_PublicKey(const AlgorithmIdentifier& alg_id, + const MemoryRegion<byte>& key_bits) : + IF_Scheme_PublicKey(alg_id, key_bits) { X509_load_hook(); } + + RW_PublicKey(const BigInt& mod, const BigInt& exponent); protected: + RW_PublicKey() {} BigInt public_op(const BigInt&) const; }; |