diff options
author | lloyd <[email protected]> | 2006-09-06 06:27:20 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-09-06 06:27:20 +0000 |
commit | 0df4cf5008f0a4f6c259dc7bcd64079e5810eb80 (patch) | |
tree | 8475c9f40e1f9b2f23053e8ffa93502a688c3f89 /include/dl_algo.h | |
parent | 219aa8f6b449f7dc81ddae48c4b01328ffe69cd3 (diff) |
First step in a major rewrite of the high level public key code. The
X509_PublicKey object now offers interfaces that return encoder and
decoder objects. Eventually these changes will make it much easier to
support alternate key formats like OpenPGP.
Diffstat (limited to 'include/dl_algo.h')
-rw-r--r-- | include/dl_algo.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/dl_algo.h b/include/dl_algo.h index ccb8a05a0..8bcd704df 100644 --- a/include/dl_algo.h +++ b/include/dl_algo.h @@ -28,16 +28,14 @@ class DL_Scheme_PublicKey : public virtual X509_PublicKey const BigInt& group_p() const { return group.get_p(); } const BigInt& group_q() const { return group.get_q(); } const BigInt& group_g() const { return group.get_g(); } + virtual DL_Group::Format group_format() const = 0; BigInt y; DL_Group group; private: - MemoryVector<byte> DER_encode_pub() const; - MemoryVector<byte> DER_encode_params() const; - void BER_decode_pub(DataSource&); - void BER_decode_params(DataSource&); + X509_Encoder* x509_encoder() const; + X509_Decoder* x509_decoder(); - virtual DL_Group::Format group_format() const = 0; virtual void X509_load_hook() {} }; @@ -58,6 +56,8 @@ class DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey, private: SecureVector<byte> DER_encode_priv() const; void BER_decode_priv(DataSource&); + MemoryVector<byte> DER_encode_params() const; + void BER_decode_params(DataSource&); virtual void PKCS8_load_hook() {} }; |