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 /strciphr.cpp | |
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 'strciphr.cpp')
-rw-r--r-- | strciphr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/strciphr.cpp b/strciphr.cpp index ca44ece..61b4df9 100644 --- a/strciphr.cpp +++ b/strciphr.cpp @@ -23,11 +23,11 @@ byte AdditiveCipherTemplate<S>::GenerateByte() } template <class S> -inline void AdditiveCipherTemplate<S>::ProcessData(byte *outString, const byte *inString, unsigned int length) +inline void AdditiveCipherTemplate<S>::ProcessData(byte *outString, const byte *inString, size_t length) { if (m_leftOver > 0) { - unsigned int len = STDMIN(m_leftOver, length); + size_t len = STDMIN(m_leftOver, length); xorbuf(outString, inString, KeystreamBufferEnd()-m_leftOver, len); length -= len; m_leftOver -= len; @@ -117,7 +117,7 @@ void CFB_CipherTemplate<BASE>::Resynchronize(const byte *iv) } template <class BASE> -void CFB_CipherTemplate<BASE>::ProcessData(byte *outString, const byte *inString, unsigned int length) +void CFB_CipherTemplate<BASE>::ProcessData(byte *outString, const byte *inString, size_t length) { assert(length % this->MandatoryBlockSize() == 0); @@ -128,7 +128,7 @@ void CFB_CipherTemplate<BASE>::ProcessData(byte *outString, const byte *inString if (m_leftOver) { - unsigned int len = STDMIN(m_leftOver, length); + size_t len = STDMIN(m_leftOver, length); CombineMessageAndShiftRegister(outString, reg + bytesPerIteration - m_leftOver, inString, len); m_leftOver -= len; length -= len; @@ -173,14 +173,14 @@ void CFB_CipherTemplate<BASE>::ProcessData(byte *outString, const byte *inString } template <class BASE> -void CFB_EncryptionTemplate<BASE>::CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, unsigned int length) +void CFB_EncryptionTemplate<BASE>::CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, size_t length) { xorbuf(reg, message, length); memcpy(output, reg, length); } template <class BASE> -void CFB_DecryptionTemplate<BASE>::CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, unsigned int length) +void CFB_DecryptionTemplate<BASE>::CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, size_t length) { for (unsigned int i=0; i<length; i++) { |