Table of Contents

Class Crc32

Namespace
VAST.Common
Assembly
VAST.Common.dll

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

buffer byte[]

The byte array containing the data.

position int

The starting position in the array.

size int

The 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

stream Stream

The stream to read data from.

size int

The 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

buffer VersatileBuffer

The VersatileBuffer containing the data.

position int

The starting position in the buffer.

size int

The 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

nByte byte

The byte to include in the checksum.

Returns

long

The updated CRC-32 checksum value.