Experimental CRC vectors for CRC16 (CCITT)

Does anyone know some CRC test vectors for CRC16-CCITT ?

I do not have a CRC implementation that I can trust, and either need to test someone else's implementation, or my own. (For CRC32, I use the PNG code as the gold standard, as this is a reliable reference implementation.)

( this site CRC calculator looks useful, but I need to check the correctness somehow)


UPDATE: the above CRC calculator looks useful , but it only accepts ascii, has no way to enter hex. . However, it is very difficult to enter hexadecimal input. (ASCII 12in hexadecimal format can be entered as %31%32, so you cannot just copy + paste the long string of hex bytes, and the character %does not seem to have an output)

I checked this online calculator that takes hexadecimal inputs against the Boost test vectors for CRC16, CRC16-CCITT and CRC32.

+5
source share
3 answers

CCITT-16 CRC ( X16 + X12 + X5 + 1 (0x1021 ), CRC 0xFFFF. XOR .):

0x12345670 = 0xB1E4

0x5A261977 = 0x1AAD
0

I found this:

http://introcs.cs.princeton.edu/java/51data/CRC16CCITT.java.html

"123456789".getBytes("ASCII"); -> 0x29b1
0
source

All Articles