aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc/fpe_fe1
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2015-12-23 11:52:19 +0100
committerJack Lloyd <[email protected]>2016-01-08 19:09:51 -0500
commitd22bc10cd4f67924acd82bcd46a31e3de3b20ce3 (patch)
tree58459585e6675cd799b6ef5900be026825cd6f9d /src/lib/misc/fpe_fe1
parent2fbfdd7e5afb5e888fd8c0b56c6df09e2bdeaca7 (diff)
Mass-prefix member vars with m_
Diffstat (limited to 'src/lib/misc/fpe_fe1')
-rw-r--r--src/lib/misc/fpe_fe1/fpe_fe1.cpp28
1 files changed, 14 insertions, 14 deletions
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<MessageAuthenticationCode> mac;
- std::vector<byte> mac_n_t;
+ std::unique_ptr<MessageAuthenticationCode> m_mac;
+ std::vector<byte> m_mac_n_t;
};
FPE_Encryptor::FPE_Encryptor(const SymmetricKey& key,
const BigInt& n,
const std::vector<byte>& 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<byte> 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<u32bit>(n_bin.size()));
- mac->update(n_bin.data(), n_bin.size());
+ m_mac->update_be(static_cast<u32bit>(n_bin.size()));
+ m_mac->update(n_bin.data(), n_bin.size());
- mac->update_be(static_cast<u32bit>(tweak.size()));
- mac->update(tweak.data(), tweak.size());
+ m_mac->update_be(static_cast<u32bit>(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<byte> r_bin = BigInt::encode_locked(R);
- mac->update(mac_n_t);
- mac->update_be(static_cast<u32bit>(round_no));
+ m_mac->update(m_mac_n_t);
+ m_mac->update_be(static_cast<u32bit>(round_no));
- mac->update_be(static_cast<u32bit>(r_bin.size()));
- mac->update(r_bin.data(), r_bin.size());
+ m_mac->update_be(static_cast<u32bit>(r_bin.size()));
+ m_mac->update(r_bin.data(), r_bin.size());
- secure_vector<byte> X = mac->final();
+ secure_vector<byte> X = m_mac->final();
return BigInt(X.data(), X.size());
}