aboutsummaryrefslogtreecommitdiffstats
path: root/lib/decoding/fire_crc.h
blob: d02021e4ce13b2e9d6a781cfebb4a3e662fd80f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
   The Hacker's Choice - http://www.thc.org
   Part of THC's GSM SCANNER PROJECT
*/



#ifndef INCLUDED_FIRE_CRC_H
#define INCLUDED_FIRE_CRC_H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct
{
	unsigned int crc_size;
	unsigned int data_size;
	unsigned int syn_start;
	int syndrome_reg[40];
} FC_CTX;

int FC_init(FC_CTX *ctx, unsigned int crc_size, unsigned int data_size);
int FC_check_crc(FC_CTX *ctx, unsigned char *input_bits, unsigned char *control_data);

#ifdef __cplusplus
}
#endif

#endif