Add native CRC16.

This commit is contained in:
2021-10-13 23:33:36 +01:00
parent d7812138c3
commit 5c1aa38fc9
4 changed files with 343 additions and 106 deletions

View File

@@ -36,8 +36,8 @@ namespace Aaru6.Checksums
/// <summary>Implements the CRC16 algorithm with IBM polynomial and seed</summary>
public sealed class CRC16IBMContext : Crc16Context
{
const ushort CRC16_IBM_POLY = 0xA001;
const ushort CRC16_IBM_SEED = 0x0000;
internal const ushort CRC16_IBM_POLY = 0xA001;
internal const ushort CRC16_IBM_SEED = 0x0000;
static readonly ushort[][] _ibmCrc16Table =
{