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 /strciphr.cpp | |
parent | 31068bd68590654dc218bbb183a2ca71bb4af08b (diff) | |
download | cryptopp-git-1db8ea50840eb47f0f7d8f3c30d8e0916932ce90.tar.gz |
port to MSVC .NET 2005 beta 2
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 ca44ecef..61b4df9e 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++) { |