recover_pk.py: replace secp192r1 by prime192v1
[RRG-proxmark3.git] / client / src / mifare / gallaghercore.h
blob378ea74235caf861a3f909934500592876ea4475
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 #ifndef MIFARE_GALLAGHERCORE_H__
17 #define MIFARE_GALLAGHERCORE_H__
19 #include "common.h"
20 #include <stdint.h>
22 typedef struct {
23 uint8_t region_code;
24 uint16_t facility_code;
25 uint32_t card_number;
26 uint8_t issue_level;
27 } GallagherCredentials_t;
29 void gallagher_encode_creds(uint8_t *eight_bytes, GallagherCredentials_t *creds);
31 void gallagher_decode_creds(uint8_t *eight_bytes, GallagherCredentials_t *creds);
33 bool gallagher_is_valid_creds(uint64_t region_code, uint64_t facility_code, uint64_t card_number, uint64_t issue_level);
35 #endif