summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/crc-16.h
blob: 3e0756007fcdf089c61e8cf5ac45f0212acdc7bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
/* ######################################################################

   CRC16 - Compute a 16bit crc very quickly
   
   ##################################################################### */
									/*}}}*/
#ifndef APTPKG_CRC16_H
#define APTPKG_CRC16_H

#include <apt-pkg/macros.h>

#define INIT_FCS  0xffff
unsigned short AddCRC16Byte(unsigned short fcs, unsigned char byte) APT_PURE;
unsigned short AddCRC16(unsigned short fcs, void const *buf,
			unsigned long long len) APT_PURE;

#endif