Class CRC16
Functions for CRC16 calculation
Inherited Members
Namespace: DuetControlServer.Utility
Assembly: DuetControlServer.dll
Syntax
public static class CRC16
Methods
Calculate(Stream)
Efficient CRC16 calculation based on the CRC16-IBM algorithm
Declaration
public static ushort Calculate(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Input data |
Returns
Type | Description |
---|---|
ushort | CRC16 checksum |
Calculate(ReadOnlySpan<byte>)
Efficient CRC16 calculation based on the CRC16-IBM algorithm
Declaration
public static ushort Calculate(ReadOnlySpan<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | buffer | Buffer to calculate the checksum for |
Returns
Type | Description |
---|---|
ushort | CRC16 Checksum |