C# Class GSF.IO.Checksums.Crc32

Generates a byte-wise 32-bit CRC calculation.
显示文件 Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Methods

Method Description
Reset ( ) : void

Resets the CRC-32 data checksum as if no update was ever called.

Update ( byte buffer ) : void

Updates the checksum with the bytes taken from the array.

Update ( byte buffer, int offset, int count ) : void

Adds the byte array to the data checksum.

Update ( int value ) : void

Updates the checksum with the integer value.

Private Methods

Method Description
ComputeCrc32 ( uint oldCrc, byte value ) : uint

Method Details

Reset() public method

Resets the CRC-32 data checksum as if no update was ever called.
public Reset ( ) : void
return void

Update() public method

Updates the checksum with the bytes taken from the array.
public Update ( byte buffer ) : void
buffer byte buffer an array of bytes
return void

Update() public method

Adds the byte array to the data checksum.
public Update ( byte buffer, int offset, int count ) : void
buffer byte The buffer which contains the data
offset int The offset in the buffer where the data starts
count int The number of data bytes to update the CRC with.
return void

Update() public method

Updates the checksum with the integer value.
public Update ( int value ) : void
value int The value to use for the update.
return void