X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/7fe9b0b742d7dae9c5af1d292d11840b5c3cbfae..1b6cc9746e25e93b9c8d76e193af4796c942b167:/common/crc16.h diff --git a/common/crc16.h b/common/crc16.h index b7e2824c..645a5acf 100644 --- a/common/crc16.h +++ b/common/crc16.h @@ -1,6 +1,18 @@ -#ifndef CRC16_H__ -#define CRC16_H__ +//----------------------------------------------------------------------------- +// This code is licensed to you under the terms of the GNU GPL, version 2 or, +// at your option, any later version. See the LICENSE.txt file for the text of +// the license. +//----------------------------------------------------------------------------- +// CRC16 +//----------------------------------------------------------------------------- +#ifndef __CRC16_H +#define __CRC16_H -unsigned short update_crc16(unsigned short crc, unsigned char c); +#include +#include "util.h" // SwapBits +unsigned short update_crc16(unsigned short crc, unsigned char c); +uint16_t crc16(uint8_t const *message, int length, uint16_t remainder, uint16_t polynomial); +uint16_t crc16_ccitt(uint8_t const *message, int length); +uint16_t crc16_ccitt_kermit(uint8_t const *message, int length); #endif