summaryrefslogtreecommitdiff
path: root/des.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 /des.cpp
parent358d0cfecd593d55160df38e133b9450aaf1cd59 (diff)
downloadcryptopp-git-f5f63850f9a5521e45de3cc45be61309a2e71ab2.tar.gz
Use std namespace for memset, memcpy, memcmp (#1204)
Diffstat (limited to 'des.cpp')
-rw-r--r--des.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/des.cpp b/des.cpp
index 2a130aa4..2e9fb507 100644
--- a/des.cpp
+++ b/des.cpp
@@ -304,7 +304,7 @@ void RawDES::RawSetKey(CipherDir dir, const byte *key)
? 1 : 0; /* and store 1-bit result */
}
for (i=0; i<16; i++) { /* key chunk for each iteration */
- memset(ks,0,8); /* Clear key schedule */
+ std::memset(ks,0,8); /* Clear key schedule */
for (j=0; j<56; j++) /* rotate pc1 the right amount */
pcr[j] = pc1m[(l=j+totrot[i])<(j<28? 28 : 56) ? l: l-28];
/* rotate left and right halves independently */
@@ -450,9 +450,9 @@ void DES_XEX3::Base::UncheckedSetKey(const byte *key, unsigned int length, const
if (!m_des.get())
m_des.reset(new DES::Encryption);
- memcpy(m_x1, key + (IsForwardTransformation() ? 0 : 16), BLOCKSIZE);
+ std::memcpy(m_x1, key + (IsForwardTransformation() ? 0 : 16), BLOCKSIZE);
m_des->RawSetKey(GetCipherDirection(), key + 8);
- memcpy(m_x3, key + (IsForwardTransformation() ? 16 : 0), BLOCKSIZE);
+ std::memcpy(m_x3, key + (IsForwardTransformation() ? 16 : 0), BLOCKSIZE);
}
void DES_XEX3::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const