~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to crc.cpp

  • Committer: weidai
  • Date: 2005-07-12 04:23:32 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:198
port to MSVC .NET 2005 beta 2

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
        Reset();
123
123
}
124
124
 
125
 
void CRC32::Update(const byte *s, unsigned int n)
 
125
void CRC32::Update(const byte *s, size_t n)
126
126
{
127
127
        word32 crc = m_crc;
128
128
 
146
146
        m_crc = crc;
147
147
}
148
148
 
149
 
void CRC32::TruncatedFinal(byte *hash, unsigned int size)
 
149
void CRC32::TruncatedFinal(byte *hash, size_t size)
150
150
{
151
151
        ThrowIfInvalidTruncatedSize(size);
152
152
 
153
153
        m_crc ^= CRC32_NEGL;
154
 
        for (unsigned int i=0; i<size; i++)
 
154
        for (size_t i=0; i<size; i++)
155
155
                hash[i] = GetCrcByte(i);
156
156
 
157
157
        Reset();