Class Crc32
Provides CRC-32 checksum calculation using the standard polynomial.
public class Crc32
- Inheritance
-
Crc32
- Inherited Members
Constructors
Crc32()
public Crc32()
Methods
Calculate(byte[], int, int)
Calculates CRC-32 checksum for a portion of a byte array.
public static uint Calculate(byte[] buffer, int position, int size)
Parameters
bufferbyte[]The byte array containing the data.
positionintThe starting position in the array.
sizeintThe number of bytes to include in the calculation.
Returns
- uint
The calculated CRC-32 checksum.
Calculate(Stream, int)
Calculates CRC-32 checksum by reading from a stream.
public static uint Calculate(Stream stream, int size)
Parameters
streamStreamThe stream to read data from.
sizeintThe number of bytes to read and include in the calculation.
Returns
- uint
The calculated CRC-32 checksum.
Calculate(VersatileBuffer, int, int)
Calculates CRC-32 checksum for a portion of a VersatileBuffer.
public static uint Calculate(VersatileBuffer buffer, int position, int size)
Parameters
bufferVersatileBufferThe VersatileBuffer containing the data.
positionintThe starting position in the buffer.
sizeintThe number of bytes to include in the calculation.
Returns
- uint
The calculated CRC-32 checksum.
Update(byte)
Updates the running CRC-32 checksum with a single byte.
public long Update(byte nByte)
Parameters
nBytebyteThe byte to include in the checksum.
Returns
- long
The updated CRC-32 checksum value.