diff options
author | René Korthaus <[email protected]> | 2016-01-11 14:25:13 +0100 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-01-11 14:25:13 +0100 |
commit | 643c57b7593f8106d9142e20fcb8dcf7e8160f94 (patch) | |
tree | 9898499f290b7bb717d621eff14f7b21dfd17468 /src/lib/pubkey/rsa/rsa.cpp | |
parent | 672d29570e55686b90126b5d6f5d337ddf0b8f04 (diff) |
Prefix more member vars with m_ prefix
Diffstat (limited to 'src/lib/pubkey/rsa/rsa.cpp')
-rw-r--r-- | src/lib/pubkey/rsa/rsa.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp index 8d75d4a29..18a694754 100644 --- a/src/lib/pubkey/rsa/rsa.cpp +++ b/src/lib/pubkey/rsa/rsa.cpp @@ -191,23 +191,23 @@ class RSA_Public_Operation { public: RSA_Public_Operation(const RSA_PublicKey& rsa) : - n(rsa.get_n()), powermod_e_n(rsa.get_e(), rsa.get_n()) + m_n(rsa.get_n()), m_powermod_e_n(rsa.get_e(), rsa.get_n()) {} - size_t get_max_input_bits() const { return (n.bits() - 1); } + size_t get_max_input_bits() const { return (m_n.bits() - 1); } protected: BigInt public_op(const BigInt& m) const { - if(m >= n) + if(m >= m_n) throw Invalid_Argument("RSA public op - input is too large"); - return powermod_e_n(m); + return m_powermod_e_n(m); } - const BigInt& get_n() const { return n; } + const BigInt& get_n() const { return m_n; } - const BigInt& n; - Fixed_Exponent_Power_Mod powermod_e_n; + const BigInt& m_n; + Fixed_Exponent_Power_Mod m_powermod_e_n; }; class RSA_Encryption_Operation : public PK_Ops::Encryption_with_EME, @@ -228,7 +228,7 @@ class RSA_Encryption_Operation : public PK_Ops::Encryption_with_EME, RandomNumberGenerator&) override { BigInt m(msg, msg_len); - return BigInt::encode_1363(public_op(m), n.bytes()); + return BigInt::encode_1363(public_op(m), m_n.bytes()); } }; |