]>
Commit | Line | Data |
---|---|---|
bd20f8f4 | 1 | //----------------------------------------------------------------------------- |
d19929cb | 2 | // (c) 2012 Roel Verdult |
bd20f8f4 | 3 | // |
4 | // This code is licensed to you under the terms of the GNU GPL, version 2 or, | |
5 | // at your option, any later version. See the LICENSE.txt file for the text of | |
6 | // the license. | |
7 | //----------------------------------------------------------------------------- | |
d19929cb | 8 | // Hitag2 type prototyping |
bd20f8f4 | 9 | //----------------------------------------------------------------------------- |
2e68bd40 | 10 | |
d19929cb | 11 | #ifndef _HITAG2_H_ |
12 | #define _HITAG2_H_ | |
e30c654b | 13 | |
d19929cb | 14 | typedef enum { |
15 | RHT2F_PASSWORD = 21, | |
16 | RHT2F_AUTHENTICATE = 22, | |
17 | RHT2F_TEST_AUTH_ATTEMPTS = 25, | |
18 | } hitag_function; | |
2e68bd40 | 19 | |
d19929cb | 20 | typedef struct { |
21 | byte_t password[4]; | |
22 | } PACKED rht2d_password; | |
23 | ||
24 | typedef struct { | |
25 | byte_t NrAr[8]; | |
26 | } PACKED rht2d_authenticate; | |
27 | ||
28 | typedef union { | |
29 | rht2d_password pwd; | |
30 | rht2d_authenticate auth; | |
31 | } hitag_data; | |
e30c654b | 32 | |
33 | #endif |