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/modes/aead/gcm | |
parent | 2fbfdd7e5afb5e888fd8c0b56c6df09e2bdeaca7 (diff) |
Mass-prefix member vars with m_
Diffstat (limited to 'src/lib/modes/aead/gcm')
-rw-r--r-- | src/lib/modes/aead/gcm/gcm.cpp | 12 | ||||
-rw-r--r-- | src/lib/modes/aead/gcm/gcm.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp index a77c3e4d4..1dc5efe4f 100644 --- a/src/lib/modes/aead/gcm/gcm.cpp +++ b/src/lib/modes/aead/gcm/gcm.cpp @@ -162,7 +162,7 @@ GCM_Mode::GCM_Mode(BlockCipher* cipher, size_t tag_size) : m_tag_size(tag_size), m_cipher_name(cipher->name()) { - if(cipher->block_size() != BS) + if(cipher->block_size() != m_BS) throw Invalid_Argument("GCM requires a 128 bit cipher so cannot be used with " + cipher->name()); @@ -187,7 +187,7 @@ std::string GCM_Mode::name() const size_t GCM_Mode::update_granularity() const { - return BS; + return m_BS; } Key_Length_Specification GCM_Mode::key_spec() const @@ -199,10 +199,10 @@ void GCM_Mode::key_schedule(const byte key[], size_t keylen) { m_ctr->set_key(key, keylen); - const std::vector<byte> zeros(BS); + const std::vector<byte> zeros(m_BS); m_ctr->set_iv(zeros.data(), zeros.size()); - secure_vector<byte> H(BS); + secure_vector<byte> H(m_BS); m_ctr->encipher(H); m_ghash->set_key(H); } @@ -217,7 +217,7 @@ secure_vector<byte> GCM_Mode::start_raw(const byte nonce[], size_t nonce_len) if(!valid_nonce_length(nonce_len)) throw Invalid_IV_Length(name(), nonce_len); - secure_vector<byte> y0(BS); + secure_vector<byte> y0(m_BS); if(nonce_len == 12) { @@ -231,7 +231,7 @@ secure_vector<byte> GCM_Mode::start_raw(const byte nonce[], size_t nonce_len) m_ctr->set_iv(y0.data(), y0.size()); - secure_vector<byte> m_enc_y0(BS); + secure_vector<byte> m_enc_y0(m_BS); m_ctr->encipher(m_enc_y0); m_ghash->start(m_enc_y0.data(), m_enc_y0.size()); diff --git a/src/lib/modes/aead/gcm/gcm.h b/src/lib/modes/aead/gcm/gcm.h index 8e7ae8b7f..88afbb43c 100644 --- a/src/lib/modes/aead/gcm/gcm.h +++ b/src/lib/modes/aead/gcm/gcm.h @@ -39,7 +39,7 @@ class BOTAN_DLL GCM_Mode : public AEAD_Mode protected: GCM_Mode(BlockCipher* cipher, size_t tag_size); - const size_t BS = 16; + const size_t m_BS = 16; const size_t m_tag_size; const std::string m_cipher_name; |