OpenNETCF Smart Device Framework 2.3
Generates a CRC using a common polynomial for the next closest bitlength above that specified. For example, a bit length of 13 through 16 will use the CCITT16 polynomial masking off bits necessary to maintain the specified bitlength.

Namespace:  OpenNETCF
Assembly:  OpenNETCF (in OpenNETCF.dll) Version: 2.3.0.0

Syntax

C#
public static ulong GenerateChecksum(
	byte[] data,
	int offset,
	int length,
	CRCPolynomial polynomial,
	ulong seedCRC
)
Visual Basic (Declaration)
Public Shared Function GenerateChecksum ( _
	data As Byte(), _
	offset As Integer, _
	length As Integer, _
	polynomial As CRCPolynomial, _
	seedCRC As ULong _
) As ULong
Visual Basic (Usage)
Dim data As Byte()
Dim offset As Integer
Dim length As Integer
Dim polynomial As CRCPolynomial
Dim seedCRC As ULong
Dim returnValue As ULong

returnValue = CRC.GenerateChecksum(data, _
	offset, length, polynomial, seedCRC)
Visual C++
public:
static unsigned long long GenerateChecksum(
	array<unsigned char>^ data, 
	int offset, 
	int length, 
	CRCPolynomial polynomial, 
	unsigned long long seedCRC
)
J#
public static UInt64 GenerateChecksum(
	byte[] data,
	int offset,
	int length,
	CRCPolynomial polynomial,
	UInt64 seedCRC
)
JScript
public static function GenerateChecksum(
	data : byte[], 
	offset : int, 
	length : int, 
	polynomial : CRCPolynomial, 
	seedCRC : ulong
) : ulong
JavaScript
OpenNETCF.CRC.GenerateChecksum = function(data, offset, length, polynomial, seedCRC);

Parameters

data
Type: array< System..::.Byte >[]()[]
Data to generate a CRC for
offset
Type: System..::.Int32
The offset into the source data at which to start the CRC
length
Type: System..::.Int32
The number of bytes in the source data to analyze
polynomial
Type: OpenNETCF..::.CRCPolynomial
Standard polynomial to use for the CRC
seedCRC
Type: System..::.UInt64
CRC seed value

Return Value

The CRC

Return Value

See Also