diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-07-12 04:23:32 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-07-12 04:23:32 +0000 |
commit | d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47 (patch) | |
tree | 4b03760892a97a9bc452ebe8b7793bbebd402ad4 /iterhash.h | |
parent | fa39f51809b4da54a5c2adb3e183b1a625cefb92 (diff) | |
download | cryptopp-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.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); } |