summaryrefslogtreecommitdiff
path: root/iterhash.h
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 /iterhash.h
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 'iterhash.h')
-rw-r--r--iterhash.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/iterhash.h b/iterhash.h
index 548f3f8..2138b6d 100644
--- a/iterhash.h
+++ b/iterhash.h
@@ -24,13 +24,13 @@ public:
typedef T HashWordType;
IteratedHashBase() : m_countLo(0), m_countHi(0) {}
- unsigned int BlockSize() const {return m_data.size() * sizeof(T);}
+ unsigned int BlockSize() const {return (unsigned int)m_data.size() * sizeof(T);}
unsigned int OptimalBlockSize() const {return BlockSize();}
unsigned int OptimalDataAlignment() const {return sizeof(T);}
- void Update(const byte *input, unsigned int length);
- byte * CreateUpdateSpace(unsigned int &size);
+ void Update(const byte *input, size_t length);
+ byte * CreateUpdateSpace(size_t &size);
void Restart();
- void TruncatedFinal(byte *digest, unsigned int size);
+ void TruncatedFinal(byte *digest, size_t size);
protected:
void SetBlockSize(unsigned int blockSize) {m_data.resize(blockSize / sizeof(HashWordType));}
@@ -44,7 +44,7 @@ protected:
virtual ByteOrder GetByteOrder() const =0;
virtual void HashEndianCorrectedBlock(const HashWordType *data) =0;
- virtual unsigned int HashMultipleBlocks(const T *input, unsigned int length);
+ virtual size_t HashMultipleBlocks(const T *input, size_t length);
void HashBlock(const HashWordType *input) {HashMultipleBlocks(input, BlockSize());}
SecBlock<T> m_data; // Data buffer
@@ -75,7 +75,7 @@ public:
ByteOrder GetByteOrder() const {return T_Endianness::ToEnum();}
- inline static void CorrectEndianess(HashWordType *out, const HashWordType *in, unsigned int byteCount)
+ inline static void CorrectEndianess(HashWordType *out, const HashWordType *in, size_t byteCount)
{
ConditionalByteReverse(T_Endianness::ToEnum(), out, in, byteCount);
}