summaryrefslogtreecommitdiff
path: root/md2.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 /md2.cpp
parent358d0cfecd593d55160df38e133b9450aaf1cd59 (diff)
downloadcryptopp-git-f5f63850f9a5521e45de3cc45be61309a2e71ab2.tar.gz
Use std namespace for memset, memcpy, memcmp (#1204)
Diffstat (limited to 'md2.cpp')
-rw-r--r--md2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/md2.cpp b/md2.cpp
index b0dc7e8b..f91f3faf 100644
--- a/md2.cpp
+++ b/md2.cpp
@@ -29,9 +29,9 @@ MD2::MD2()
void MD2::Init()
{
- memset(m_X, 0, 48);
- memset(m_C, 0, 16);
- memset(m_buf, 0, 16);
+ std::memset(m_X, 0, 48);
+ std::memset(m_C, 0, 16);
+ std::memset(m_buf, 0, 16);
m_count = 0;
}
@@ -61,7 +61,7 @@ void MD2::Update(const byte *buf, size_t len)
while (len)
{
unsigned int L = UnsignedMin(16U-m_count, len);
- memcpy(m_buf+m_count, buf, L);
+ std::memcpy(m_buf+m_count, buf, L);
m_count+=L;
buf+=L;
len-=L;
@@ -71,7 +71,7 @@ void MD2::Update(const byte *buf, size_t len)
int i,j;
m_count=0;
- memcpy(m_X+16, m_buf, 16);
+ std::memcpy(m_X+16, m_buf, 16);
t=m_C[15];
for(i=0; i<16; i++)
{
@@ -111,7 +111,7 @@ void MD2::TruncatedFinal(byte *hash, size_t size)
for(i=0; i<padlen; i++) padding[i]=(byte)padlen;
Update(padding, padlen);
Update(m_C, 16);
- memcpy(hash, m_X, size);
+ std::memcpy(hash, m_X, size);
Init();
}