diff options
author | lloyd <[email protected]> | 2010-03-04 03:51:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 03:51:55 +0000 |
commit | e998558e1fa903b32155b694107082fff25f9c0e (patch) | |
tree | ed36916dc4aa216bd996d2ec308159741b2b0bf8 /src/pubkey/dl_algo | |
parent | fe9aa5acece6c004f2c1c1aa4b23d7c44207672f (diff) |
Kill pkcs8_decoder
Diffstat (limited to 'src/pubkey/dl_algo')
-rw-r--r-- | src/pubkey/dl_algo/dl_algo.cpp | 30 | ||||
-rw-r--r-- | src/pubkey/dl_algo/dl_algo.h | 7 |
2 files changed, 0 insertions, 37 deletions
diff --git a/src/pubkey/dl_algo/dl_algo.cpp b/src/pubkey/dl_algo/dl_algo.cpp index 185e62cef..8e326ef6a 100644 --- a/src/pubkey/dl_algo/dl_algo.cpp +++ b/src/pubkey/dl_algo/dl_algo.cpp @@ -49,36 +49,6 @@ DL_Scheme_PrivateKey::DL_Scheme_PrivateKey(const AlgorithmIdentifier& alg_id, } /* -* Return the PKCS #8 private key decoder -*/ -PKCS8_Decoder* DL_Scheme_PrivateKey::pkcs8_decoder(RandomNumberGenerator& rng) - { - class DL_Scheme_Decoder : public PKCS8_Decoder - { - public: - void alg_id(const AlgorithmIdentifier& alg_id) - { - DataSource_Memory source(alg_id.parameters); - key->group.BER_decode(source, key->group_format()); - } - - void key_bits(const MemoryRegion<byte>& bits) - { - BER_Decoder(bits).decode(key->x); - key->PKCS8_load_hook(rng); - } - - DL_Scheme_Decoder(DL_Scheme_PrivateKey* k, RandomNumberGenerator& r) : - key(k), rng(r) {} - private: - DL_Scheme_PrivateKey* key; - RandomNumberGenerator& rng; - }; - - return new DL_Scheme_Decoder(this, rng); - } - -/* * Check Public DL Parameters */ bool DL_Scheme_PublicKey::check_key(RandomNumberGenerator& rng, diff --git a/src/pubkey/dl_algo/dl_algo.h b/src/pubkey/dl_algo/dl_algo.h index 59690a33a..efd25c995 100644 --- a/src/pubkey/dl_algo/dl_algo.h +++ b/src/pubkey/dl_algo/dl_algo.h @@ -95,13 +95,6 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey, const MemoryRegion<byte>& key_bits, DL_Group::Format group_format); - /** - * Get an PKCS#8 decoder for this key. - * @param rng the rng to use - * @return an decoder usable to decode a DL key and store the - * values in this instance. - */ - PKCS8_Decoder* pkcs8_decoder(RandomNumberGenerator& rng); protected: DL_Scheme_PrivateKey() {} BigInt x; |