Background
I need to implement this algorithm in Node.js, but after searching everywhere I can't find an implementation.
Code
My first approach was reviewed by a member of StackOverflow and was considered correct:
However, it didn't work with the test vectors. So at this point I am assuming that I missed or miss interpreted something and that I implemented the wrong algorithm.
Questions
- Where can I find an implementation of CRC-16-IBM, Reversed 0xA001, Little Endian (DCBA) ?
- Is there a way to know given N test vectors which algorithm is being used to create the CRC?
PS: if it is in Javascript, perfect, if not, I can convert it.
Test message:
00000000000000C1080500000164880D438001014CC5F918ACC14200000000000000F00301F00002B60000430E8B000000000164880C68C000014CC5F918ACC14200000000000000000301F00102B60000430E97000000000164880CA35800014CC5F918ACC14200000000000000000301F00102B60000430E99000000000164880CDDF000014CC5F918ACC14200000000000000000301F00102B60000430E99000000000164880D188800014CC5F918ACC14200000000000000000301F00102B60000430E9800000500008DC5
CRC for this message:
00008DC5