summaryrefslogtreecommitdiff
path: root/vmac.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2023-04-15 16:45:02 -0400
committerGitHub <noreply@github.com>2023-04-15 16:45:02 -0400
commitf5f63850f9a5521e45de3cc45be61309a2e71ab2 (patch)
treed9ec904ebd511ae673e89790a407f0cdcf0b9bbc /vmac.cpp
parent358d0cfecd593d55160df38e133b9450aaf1cd59 (diff)
downloadcryptopp-git-f5f63850f9a5521e45de3cc45be61309a2e71ab2.tar.gz
Use std namespace for memset, memcpy, memcmp (#1204)
Diffstat (limited to 'vmac.cpp')
-rw-r--r--vmac.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/vmac.cpp b/vmac.cpp
index c625c6bb..9f930b44 100644
--- a/vmac.cpp
+++ b/vmac.cpp
@@ -133,8 +133,8 @@ void VMAC_Base::Resynchronize(const byte *nonce, int len)
if (m_is128)
{
- memset(storedNonce, 0, s-length);
- memcpy(storedNonce+s-length, nonce, length);
+ std::memset(storedNonce, 0, s-length);
+ std::memcpy(storedNonce+s-length, nonce, length);
AccessCipher().ProcessBlock(storedNonce, m_pad());
}
else
@@ -147,8 +147,8 @@ void VMAC_Base::Resynchronize(const byte *nonce, int len)
}
if (!m_padCached)
{
- memset(storedNonce, 0, s-length);
- memcpy(storedNonce+s-length, nonce, length-1);
+ std::memset(storedNonce, 0, s-length);
+ std::memcpy(storedNonce+s-length, nonce, length-1);
storedNonce[s-1] = nonce[length-1] & 0xfe;
AccessCipher().ProcessBlock(storedNonce, m_pad());
m_padCached = true;
@@ -844,7 +844,7 @@ void VMAC_Base::TruncatedFinal(byte *mac, size_t size)
if (len)
{
- memset(m_data()+len, 0, (0-len)%16);
+ std::memset(m_data()+len, 0, (0-len)%16);
VHASH_Update(DataBuf(), ((len+15)/16)*2);
len *= 8; // convert to bits
}
@@ -874,7 +874,7 @@ void VMAC_Base::TruncatedFinal(byte *mac, size_t size)
{
t[0] = ConditionalByteReverse(BIG_ENDIAN_ORDER, t[0]);
t[1] = ConditionalByteReverse(BIG_ENDIAN_ORDER, t[1]);
- memcpy(mac, t, size);
+ std::memcpy(mac, t, size);
}
}
else
@@ -886,7 +886,7 @@ void VMAC_Base::TruncatedFinal(byte *mac, size_t size)
else
{
t = ConditionalByteReverse(BIG_ENDIAN_ORDER, t);
- memcpy(mac, &t, size);
+ std::memcpy(mac, &t, size);
}
}
}