diff options
author | lloyd <[email protected]> | 2010-03-02 02:23:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-02 02:23:52 +0000 |
commit | 9c2131c935f052f3c783e3fd35e13f2908d02a98 (patch) | |
tree | 444176986153ed98216bc60c177bf49ef6606ef8 /src/pubkey/gost_3410/gost_3410.h | |
parent | 3435b04adf83c714d9907e85135db30a0e1d07c4 (diff) |
Remove auto_ptr from ECC key types
Diffstat (limited to 'src/pubkey/gost_3410/gost_3410.h')
-rw-r--r-- | src/pubkey/gost_3410/gost_3410.h | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.h b/src/pubkey/gost_3410/gost_3410.h index 2f97c1a04..1d3430753 100644 --- a/src/pubkey/gost_3410/gost_3410.h +++ b/src/pubkey/gost_3410/gost_3410.h @@ -34,12 +34,12 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey, * @result the maximum number of input bits */ - u32bit max_input_bits() const; + u32bit max_input_bits() const { return domain().get_order().bits(); } u32bit message_parts() const { return 2; } u32bit message_part_size() const - { return mp_dom_pars->get_order().bytes(); } + { return domain().get_order().bytes(); } /** * Verify a message with this key. @@ -65,16 +65,6 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey, GOST_3410_PublicKey(const EC_Domain_Params& dom_par, const PointGFp& public_point); // sets core - GOST_3410_PublicKey const& operator=(const GOST_3410_PublicKey& rhs); - - GOST_3410_PublicKey(const GOST_3410_PublicKey& other); - - /** - * Ensure that the public point and domain parameters of this key are set. - * @throw Invalid_State if either of the two data members is not set - */ - virtual void affirm_init() const; - /** * Get an x509_encoder that can be used to encode this key. * @result an x509_encoder for this key @@ -87,10 +77,6 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey, * @result an x509_decoder for this key */ X509_Decoder* x509_decoder(); - - protected: - void X509_load_hook(); - void set_all_values(const GOST_3410_PublicKey& other); }; /** @@ -121,30 +107,14 @@ class BOTAN_DLL GOST_3410_PrivateKey : public GOST_3410_PublicKey, */ GOST_3410_PrivateKey(const EC_Domain_Params& domain, const BigInt& x); - GOST_3410_PrivateKey(const GOST_3410_PrivateKey& other); - GOST_3410_PrivateKey const& operator=(const GOST_3410_PrivateKey& rhs); - /** * Sign a message with this key. * @param message the byte array representing the message to be signed * @param mess_len the length of the message byte array * @result the signature */ - SecureVector<byte> sign(const byte message[], u32bit mess_len, RandomNumberGenerator& rng) const; - - /** - * Make sure that the public key parts of this object are set - * (calls EC_PublicKey::affirm_init()) as well as the private key - * value. - * @throw Invalid_State if the above conditions are not satisfied - */ - virtual void affirm_init() const; - - private: - void set_all_values(const GOST_3410_PrivateKey& other); - void PKCS8_load_hook(bool = false); }; } |