public CRC16b(ushort polynomial) { HashSizeValue = 16; _crc16Table = (ushort[])_crc16TablesCache[polynomial]; if (_crc16Table == null) { _crc16Table = CRC16b._buildCRC16Table(polynomial); _crc16TablesCache.Add(polynomial, _crc16Table); } Initialize(); }
// static constructor static CRC16b() { _crc16TablesCache = Hashtable.Synchronized(new Hashtable()); _defaultCRC = new CRC16b(); }