diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-03-01 06:10:06 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-03-01 06:10:06 -0500 |
commit | 5efb019d8bdc593b3c1a0b57d615b170c7dab02a (patch) | |
tree | e2c10e737542fd13ea50b58480e0791bbc455e47 /gcm.cpp | |
parent | 5fb2f5d45b9bb2cd86db5d01f4b30d606a2a4c80 (diff) | |
download | cryptopp-git-5efb019d8bdc593b3c1a0b57d615b170c7dab02a.tar.gz |
Add C++ nullptr support (Issue 383)
Diffstat (limited to 'gcm.cpp')
-rw-r--r-- | gcm.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -174,7 +174,7 @@ void gcm_gf_mult(const unsigned char *a, const unsigned char *b, unsigned char * V0 = (V0>>1) ^ (x ? W64LIT(0xe1) << 56 : 0);
}
}
- Block::Put(NULL, c)(Z0)(Z1);
+ Block::Put(NULLPTR, c)(Z0)(Z1);
}
__m128i _mm_clmulepi64_si128(const __m128i &a, const __m128i &b, int i)
@@ -421,7 +421,7 @@ void GCM_Base::SetKeyWithoutResync(const byte *userKey, size_t keylength, const for (i=0; i<128; i++)
{
k = i%8;
- Block::Put(NULL, table+(i/8)*256*16+(size_t(1)<<(11-k)))(V0)(V1);
+ Block::Put(NULLPTR, table+(i/8)*256*16+(size_t(1)<<(11-k)))(V0)(V1);
int x = (int)V1 & 1;
V1 = (V1>>1) | (V0<<63);
@@ -470,9 +470,9 @@ void GCM_Base::SetKeyWithoutResync(const byte *userKey, size_t keylength, const {
k = i%32;
if (k < 4)
- Block::Put(NULL, table+1024+(i/32)*256+(size_t(1)<<(7-k)))(V0)(V1);
+ Block::Put(NULLPTR, table+1024+(i/32)*256+(size_t(1)<<(7-k)))(V0)(V1);
else if (k < 8)
- Block::Put(NULL, table+(i/32)*256+(size_t(1)<<(11-k)))(V0)(V1);
+ Block::Put(NULLPTR, table+(i/32)*256+(size_t(1)<<(11-k)))(V0)(V1);
int x = (int)V1 & 1;
V1 = (V1>>1) | (V0<<63);
@@ -561,7 +561,7 @@ void GCM_Base::Resync(const byte *iv, size_t len) GCM_Base::AuthenticateBlocks(m_buffer, HASH_BLOCKSIZE);
}
- PutBlock<word64, BigEndian, true>(NULL, m_buffer)(0)(origLen*8);
+ PutBlock<word64, BigEndian, true>(NULLPTR, m_buffer)(0)(origLen*8);
GCM_Base::AuthenticateBlocks(m_buffer, HASH_BLOCKSIZE);
ReverseHashBufferIfNeeded();
@@ -1172,7 +1172,7 @@ void GCM_Base::AuthenticateLastHeaderBlock() void GCM_Base::AuthenticateLastConfidentialBlock()
{
GCM_Base::AuthenticateLastHeaderBlock();
- PutBlock<word64, BigEndian, true>(NULL, m_buffer)(m_totalHeaderLength*8)(m_totalMessageLength*8);
+ PutBlock<word64, BigEndian, true>(NULLPTR, m_buffer)(m_totalHeaderLength*8)(m_totalMessageLength*8);
GCM_Base::AuthenticateBlocks(m_buffer, HASH_BLOCKSIZE);
}
|