OpenNETCF Smart Device Framework 2.3
Assembly: OpenNETCF (in OpenNETCF.dll) Version: 2.3.0.0
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:
OpenNETCFAssembly: OpenNETCF (in OpenNETCF.dll) Version: 2.3.0.0
Syntax
| C# |
|---|
public static ulong GenerateChecksum( byte[] data, int offset, int length, int crcBitLength, ulong polynomial, ulong seedCRC ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function GenerateChecksum ( _ data As Byte(), _ offset As Integer, _ length As Integer, _ crcBitLength As Integer, _ polynomial As ULong, _ seedCRC As ULong _ ) As ULong |
| Visual Basic (Usage) |
|---|
Dim data As Byte() Dim offset As Integer Dim length As Integer Dim crcBitLength As Integer Dim polynomial As ULong Dim seedCRC As ULong Dim returnValue As ULong returnValue = CRC.GenerateChecksum(data, _ offset, length, crcBitLength, polynomial, _ seedCRC) |
| Visual C++ |
|---|
public: static unsigned long long GenerateChecksum( array<unsigned char>^ data, int offset, int length, int crcBitLength, unsigned long long polynomial, unsigned long long seedCRC ) |
| J# |
|---|
public static UInt64 GenerateChecksum( byte[] data, int offset, int length, int crcBitLength, UInt64 polynomial, UInt64 seedCRC ) |
| JScript |
|---|
public static function GenerateChecksum( data : byte[], offset : int, length : int, crcBitLength : int, polynomial : ulong, seedCRC : ulong ) : ulong |
| JavaScript |
|---|
OpenNETCF.CRC.GenerateChecksum = function(data, offset, length, crcBitLength, 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
- crcBitLength
- Type: System..::.Int32
Length, in bits, of the polynomial to use
- polynomial
- Type: System..::.UInt64
Custom polynomial to use for the CRC
- seedCRC
- Type: System..::.UInt64
CRC seed value