diff options
| author | weidai <weidai11@users.noreply.github.com> | 2005-07-12 04:23:32 +0000 |
|---|---|---|
| committer | weidai <weidai11@users.noreply.github.com> | 2005-07-12 04:23:32 +0000 |
| commit | 1db8ea50840eb47f0f7d8f3c30d8e0916932ce90 (patch) | |
| tree | 4b03760892a97a9bc452ebe8b7793bbebd402ad4 /md2.cpp | |
| parent | 31068bd68590654dc218bbb183a2ca71bb4af08b (diff) | |
| download | cryptopp-git-1db8ea50840eb47f0f7d8f3c30d8e0916932ce90.tar.gz | |
port to MSVC .NET 2005 beta 2
Diffstat (limited to 'md2.cpp')
| -rw-r--r-- | md2.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |
