summaryrefslogtreecommitdiff
path: root/trunhash.h
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2005-07-12 04:23:32 +0000
committerweidai <weidai11@users.noreply.github.com>2005-07-12 04:23:32 +0000
commit1db8ea50840eb47f0f7d8f3c30d8e0916932ce90 (patch)
tree4b03760892a97a9bc452ebe8b7793bbebd402ad4 /trunhash.h
parent31068bd68590654dc218bbb183a2ca71bb4af08b (diff)
downloadcryptopp-git-1db8ea50840eb47f0f7d8f3c30d8e0916932ce90.tar.gz
port to MSVC .NET 2005 beta 2
Diffstat (limited to 'trunhash.h')
-rw-r--r--trunhash.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/trunhash.h b/trunhash.h
index 66d600ff..df733a6d 100644
--- a/trunhash.h
+++ b/trunhash.h
@@ -8,10 +8,10 @@ NAMESPACE_BEGIN(CryptoPP)
class NullHash : public HashTransformation
{
public:
- void Update(const byte *input, unsigned int length) {}
+ void Update(const byte *input, size_t length) {}
unsigned int DigestSize() const {return 0;}
- void TruncatedFinal(byte *digest, unsigned int digestSize) {}
- bool TruncatedVerify(const byte *digest, unsigned int digestLength) {return true;}
+ void TruncatedFinal(byte *digest, size_t digestSize) {}
+ bool TruncatedVerify(const byte *digest, size_t digestLength) {return true;}
};
//! construct new HashModule with smaller DigestSize() from existing one
@@ -21,17 +21,17 @@ class TruncatedHashTemplate : public HashTransformation
public:
TruncatedHashTemplate(T hm, unsigned int digestSize)
: m_hm(hm), m_digestSize(digestSize) {}
- TruncatedHashTemplate(const byte *key, unsigned int keyLength, unsigned int digestSize)
+ TruncatedHashTemplate(const byte *key, size_t keyLength, unsigned int digestSize)
: m_hm(key, keyLength), m_digestSize(digestSize) {}
- TruncatedHashTemplate(unsigned int digestSize)
+ TruncatedHashTemplate(size_t digestSize)
: m_digestSize(digestSize) {}
- void Update(const byte *input, unsigned int length)
+ void Update(const byte *input, size_t length)
{m_hm.Update(input, length);}
unsigned int DigestSize() const {return m_digestSize;}
- void TruncatedFinal(byte *digest, unsigned int digestSize)
+ void TruncatedFinal(byte *digest, size_t digestSize)
{m_hm.TruncatedFinal(digest, digestSize);}
- bool TruncatedVerify(const byte *digest, unsigned int digestLength)
+ bool TruncatedVerify(const byte *digest, size_t digestLength)
{return m_hm.TruncatedVerify(digest, digestLength);}
private: