CRC library

Good night everyone,
I'm looking for a decent CRC library that can return me an int CRC value calculate on an array of bytes, i prefer CRC16 if possible.
Thank you so much for reading this.

andremartins4:
Good night everyone,
I'm looking for a decent CRC library that can return me an int CRC value calculate on an array of bytes, i prefer CRC16 if possible.
Thank you so much for reading this.

What about starting with a CRC function like that:

uint16_t crc16_update(uint16_t crc, uint8_t a)
{
  int i;
  crc ^= a;
  for (i = 0; i < 8; ++i)
  {
    if (crc & 1)crc = (crc >> 1) ^ 0xA001;
    else crc = (crc >> 1);
  }
  return crc;
}

Code copied from: avr-libc: <util/crc16.h>: CRC Computations

That type of CRC16 calculation is included in the Arduino core libraries.
(Arduino provides three different CRC16 computations)
(For speed reasons, they are not implemented in C, but in optimized Assembler code)