Click or drag to resize

Crc16 Class

Generates a byte-wise 16-bit CRC calculation.
Inheritance Hierarchy
SystemObject
  GSF.IO.ChecksumsCrc16

Namespace: GSF.IO.Checksums
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public sealed class Crc16
View Source

The Crc16 type exposes the following members.

Constructors
 NameDescription
Public methodCrc16 Creates a new instance of the Crc16 class. The checksum starts off with a value of 0x0000.
Public methodCrc16(ChecksumType) Creates a new instance of the Crc16 class.
Top
Properties
 NameDescription
Public propertyValue Returns the CRC-16 data checksum computed so far.
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodReset Resets the CRC-16 data checksum as if no update was ever called.
Public methodReset(ChecksumType) Resets the CRC-16 data checksum as if no update was ever called.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUpdate(Byte) Updates the checksum with the byte value.
Public methodUpdate(Byte) Updates the checksum with the bytes taken from the array.
Public methodUpdate(Byte, Int32, Int32) Adds the byte array to the data checksum.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks

2-byte (16-bit) CRC: The generating polynomial is

16 15 2 1

G(X) = X + X + X + X

See Also