X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/7fe9b0b742d7dae9c5af1d292d11840b5c3cbfae..f5538c1c4ec3fc35e52cc7436029322cc3bb8639:/common/crc16.h diff --git a/common/crc16.h b/common/crc16.h index b7e2824c..3db2cd79 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" +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