go-crc16 icon indicating copy to clipboard operation
go-crc16 copied to clipboard

crc16计算结果错误 CRC16 calculation error

Open xiaoa7 opened this issue 7 years ago • 0 comments

The variable CRC needs to be initialized // func Crc16(bs []byte) (crc uint16) { //init crc crc = 0xffff l := len(bs) for i := 0; i < l; i++ { crc = ((crc << 8) & 0xff00) ^ crc16tab[((crc>>8)&0xff)^uint16(bs[i])] } return }

xiaoa7 avatar Dec 15 '17 06:12 xiaoa7