From d22bc10cd4f67924acd82bcd46a31e3de3b20ce3 Mon Sep 17 00:00:00 2001 From: René Korthaus Date: Wed, 23 Dec 2015 11:52:19 +0100 Subject: Mass-prefix member vars with m_ --- src/lib/misc/fpe_fe1/fpe_fe1.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/lib/misc/fpe_fe1') diff --git a/src/lib/misc/fpe_fe1/fpe_fe1.cpp b/src/lib/misc/fpe_fe1/fpe_fe1.cpp index 197dbb21a..c59e41e78 100644 --- a/src/lib/misc/fpe_fe1/fpe_fe1.cpp +++ b/src/lib/misc/fpe_fe1/fpe_fe1.cpp @@ -85,42 +85,42 @@ class FPE_Encryptor BigInt operator()(size_t i, const BigInt& R); private: - std::unique_ptr mac; - std::vector mac_n_t; + std::unique_ptr m_mac; + std::vector m_mac_n_t; }; FPE_Encryptor::FPE_Encryptor(const SymmetricKey& key, const BigInt& n, const std::vector& tweak) { - mac.reset(new HMAC(new SHA_256)); - mac->set_key(key); + m_mac.reset(new HMAC(new SHA_256)); + m_mac->set_key(key); std::vector n_bin = BigInt::encode(n); if(n_bin.size() > MAX_N_BYTES) throw Exception("N is too large for FPE encryption"); - mac->update_be(static_cast(n_bin.size())); - mac->update(n_bin.data(), n_bin.size()); + m_mac->update_be(static_cast(n_bin.size())); + m_mac->update(n_bin.data(), n_bin.size()); - mac->update_be(static_cast(tweak.size())); - mac->update(tweak.data(), tweak.size()); + m_mac->update_be(static_cast(tweak.size())); + m_mac->update(tweak.data(), tweak.size()); - mac_n_t = unlock(mac->final()); + m_mac_n_t = unlock(m_mac->final()); } BigInt FPE_Encryptor::operator()(size_t round_no, const BigInt& R) { secure_vector r_bin = BigInt::encode_locked(R); - mac->update(mac_n_t); - mac->update_be(static_cast(round_no)); + m_mac->update(m_mac_n_t); + m_mac->update_be(static_cast(round_no)); - mac->update_be(static_cast(r_bin.size())); - mac->update(r_bin.data(), r_bin.size()); + m_mac->update_be(static_cast(r_bin.size())); + m_mac->update(r_bin.data(), r_bin.size()); - secure_vector X = mac->final(); + secure_vector X = m_mac->final(); return BigInt(X.data(), X.size()); } -- cgit v1.2.3