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 crcBitLength
)
Visual Basic (Declaration)
Public Shared Function GenerateChecksum ( _
	data As Byte(), _
	crcBitLength As Integer _
) As ULong
Visual Basic (Usage)
Dim data As Byte()
Dim crcBitLength As Integer
Dim returnValue As ULong

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

Parameters

data
Type: array< System..::.Byte >[]()[]
Data to generate a CRC for
crcBitLength
Type: System..::.Int32
Length, in bits, of the polynomial to use

Return Value

The CRC

See Also