NBit Bit Manipulation Library

Crc.Custom(Int32, UInt32, CrcFormat, Boolean, Boolean) Method

Creates a custom CRC calculator.

[Visual Basic]
Public Overloads Shared Sub Custom( _
   ByVal bits As Integer, _
   ByVal polynomial As UInt32, _
   ByVal format As CrcFormat, _
   ByVal presetToOnes As Boolean, _
   ByVal postinvert As Boolean _
)
[C#]
public static Crc Custom(
   int bits,
   uint polynomial,
   CrcFormat format,
   bool presetToOnes,
   bool postinvert
);

Parameters

bits
The number of bits in the CRC.
polynomial
The CRC polynomial.
format
The CRC format.
presetToOnes
If true, the initial value will be all ones. Otherwise, it will be all zeros.
postinvert
If true, the final computed value will be inverted.

Return Value

The CRC calculator.

See Also

Crc Class | NBit Namespace | Crc.Custom Overload List