summaryrefslogtreecommitdiff
path: root/md2.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-07-12 04:23:32 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-07-12 04:23:32 +0000
commitd5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47 (patch)
tree4b03760892a97a9bc452ebe8b7793bbebd402ad4 /md2.cpp
parentfa39f51809b4da54a5c2adb3e183b1a625cefb92 (diff)
downloadcryptopp-d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47.tar.gz
port to MSVC .NET 2005 beta 2
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@198 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'md2.cpp')
-rw-r--r--md2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/md2.cpp b/md2.cpp
index a010dc0..1021932 100644
--- a/md2.cpp
+++ b/md2.cpp
@@ -33,7 +33,7 @@ void MD2::Init()
m_count = 0;
}
-void MD2::Update(const byte *buf, unsigned int len)
+void MD2::Update(const byte *buf, size_t len)
{
static const byte S[256] = {
41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6,
@@ -58,7 +58,7 @@ void MD2::Update(const byte *buf, unsigned int len)
while (len)
{
- word32 L = (16-m_count) < len ? (16-m_count) : len;
+ unsigned int L = UnsignedMin(16U-m_count, len);
memcpy(m_buf+m_count, buf, L);
m_count+=L;
buf+=L;
@@ -97,7 +97,7 @@ void MD2::Update(const byte *buf, unsigned int len)
}
}
-void MD2::TruncatedFinal(byte *hash, unsigned int size)
+void MD2::TruncatedFinal(byte *hash, size_t size)
{
ThrowIfInvalidTruncatedSize(size);