diff options
author | René Korthaus <[email protected]> | 2015-12-23 11:52:19 +0100 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-01-08 19:09:51 -0500 |
commit | d22bc10cd4f67924acd82bcd46a31e3de3b20ce3 (patch) | |
tree | 58459585e6675cd799b6ef5900be026825cd6f9d /src/lib/pubkey/dl_algo | |
parent | 2fbfdd7e5afb5e888fd8c0b56c6df09e2bdeaca7 (diff) |
Mass-prefix member vars with m_
Diffstat (limited to 'src/lib/pubkey/dl_algo')
-rw-r--r-- | src/lib/pubkey/dl_algo/dl_algo.cpp | 26 | ||||
-rw-r--r-- | src/lib/pubkey/dl_algo/dl_algo.h | 18 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/pubkey/dl_algo/dl_algo.cpp b/src/lib/pubkey/dl_algo/dl_algo.cpp index 4d179fe50..d85249750 100644 --- a/src/lib/pubkey/dl_algo/dl_algo.cpp +++ b/src/lib/pubkey/dl_algo/dl_algo.cpp @@ -15,41 +15,41 @@ namespace Botan { size_t DL_Scheme_PublicKey::estimated_strength() const { - return dl_work_factor(group.get_p().bits()); + return dl_work_factor(m_group.get_p().bits()); } AlgorithmIdentifier DL_Scheme_PublicKey::algorithm_identifier() const { return AlgorithmIdentifier(get_oid(), - group.DER_encode(group_format())); + m_group.DER_encode(group_format())); } std::vector<byte> DL_Scheme_PublicKey::x509_subject_public_key() const { - return DER_Encoder().encode(y).get_contents_unlocked(); + return DER_Encoder().encode(m_y).get_contents_unlocked(); } DL_Scheme_PublicKey::DL_Scheme_PublicKey(const AlgorithmIdentifier& alg_id, const secure_vector<byte>& key_bits, DL_Group::Format format) { - group.BER_decode(alg_id.parameters, format); + m_group.BER_decode(alg_id.parameters, format); - BER_Decoder(key_bits).decode(y); + BER_Decoder(key_bits).decode(m_y); } secure_vector<byte> DL_Scheme_PrivateKey::pkcs8_private_key() const { - return DER_Encoder().encode(x).get_contents(); + return DER_Encoder().encode(m_x).get_contents(); } DL_Scheme_PrivateKey::DL_Scheme_PrivateKey(const AlgorithmIdentifier& alg_id, const secure_vector<byte>& key_bits, DL_Group::Format format) { - group.BER_decode(alg_id.parameters, format); + m_group.BER_decode(alg_id.parameters, format); - BER_Decoder(key_bits).decode(x); + BER_Decoder(key_bits).decode(m_x); } /* @@ -58,9 +58,9 @@ DL_Scheme_PrivateKey::DL_Scheme_PrivateKey(const AlgorithmIdentifier& alg_id, bool DL_Scheme_PublicKey::check_key(RandomNumberGenerator& rng, bool strong) const { - if(y < 2 || y >= group_p()) + if(m_y < 2 || m_y >= group_p()) return false; - if(!group.verify_group(rng, strong)) + if(!m_group.verify_group(rng, strong)) return false; return true; } @@ -74,15 +74,15 @@ bool DL_Scheme_PrivateKey::check_key(RandomNumberGenerator& rng, const BigInt& p = group_p(); const BigInt& g = group_g(); - if(y < 2 || y >= p || x < 2 || x >= p) + if(m_y < 2 || m_y >= p || m_x < 2 || m_x >= p) return false; - if(!group.verify_group(rng, strong)) + if(!m_group.verify_group(rng, strong)) return false; if(!strong) return true; - if(y != power_mod(g, x, p)) + if(m_y != power_mod(g, m_x, p)) return false; return true; diff --git a/src/lib/pubkey/dl_algo/dl_algo.h b/src/lib/pubkey/dl_algo/dl_algo.h index 18886e5dc..705cce8b3 100644 --- a/src/lib/pubkey/dl_algo/dl_algo.h +++ b/src/lib/pubkey/dl_algo/dl_algo.h @@ -29,30 +29,30 @@ class BOTAN_DLL DL_Scheme_PublicKey : public virtual Public_Key * Get the DL domain parameters of this key. * @return DL domain parameters of this key */ - const DL_Group& get_domain() const { return group; } + const DL_Group& get_domain() const { return m_group; } /** * Get the public value y with y = g^x mod p where x is the secret key. */ - const BigInt& get_y() const { return y; } + const BigInt& get_y() const { return m_y; } /** * Get the prime p of the underlying DL group. * @return prime p */ - const BigInt& group_p() const { return group.get_p(); } + const BigInt& group_p() const { return m_group.get_p(); } /** * Get the prime q of the underlying DL group. * @return prime q */ - const BigInt& group_q() const { return group.get_q(); } + const BigInt& group_q() const { return m_group.get_q(); } /** * Get the generator g of the underlying DL group. * @return generator g */ - const BigInt& group_g() const { return group.get_g(); } + const BigInt& group_g() const { return m_group.get_g(); } /** * Get the underlying groups encoding format. @@ -72,12 +72,12 @@ class BOTAN_DLL DL_Scheme_PublicKey : public virtual Public_Key /** * The DL public key */ - BigInt y; + BigInt m_y; /** * The DL group */ - DL_Group group; + DL_Group m_group; }; /** @@ -93,7 +93,7 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey, * Get the secret key x. * @return secret key */ - const BigInt& get_x() const { return x; } + const BigInt& get_x() const { return m_x; } secure_vector<byte> pkcs8_private_key() const override; @@ -107,7 +107,7 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey, /** * The DL private key */ - BigInt x; + BigInt m_x; }; } |