Merge pull request #9 from Proxmark/master
[proxmark3-svn] / client / cmdlfhid.h
CommitLineData
a553f267 1//-----------------------------------------------------------------------------
2// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
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//-----------------------------------------------------------------------------
8// Low frequency HID commands
9//-----------------------------------------------------------------------------
10
7fe9b0b7 11#ifndef CMDLFHID_H__
12#define CMDLFHID_H__
13
ab20cc35
MF
14#include <stdint.h>
15#include <stdbool.h>
16
1ee624fe 17// Structure for unpacked HID Prox tags.
ab20cc35
MF
18typedef struct {
19 // Format length, in bits.
20 uint8_t fmtLen;
21
22 // Facility code.
23 uint32_t fc;
24
25 // Card number.
1ee624fe 26 uint64_t cardnum;
ab20cc35
MF
27
28 // Parity validity.
29 //
1ee624fe 30 // When used with pack_hid, this determines if we should calculate
ab20cc35
MF
31 // parity values for the ID.
32 //
1ee624fe 33 // When used with unpack_hid, this indicates if we got valid parity
ab20cc35
MF
34 // values for the ID.
35 bool parityValid;
1ee624fe 36} hid_info;
37
38bool pack_hid(/* out */ uint32_t *hi2, /* out */ uint32_t *hi, /* out */ uint32_t *lo, /* in */ const hid_info *info);
39bool unpack_hid(hid_info* out, uint32_t hi2, uint32_t hi, uint32_t lo);
ab20cc35 40
ab20cc35 41
7fe9b0b7 42int CmdLFHID(const char *Cmd);
6cd2eef4 43int CmdFSKdemodHID(const char *Cmd);
44int CmdHIDReadDemod(const char *Cmd);
7fe9b0b7 45int CmdHIDSim(const char *Cmd);
2767fc02 46int CmdHIDClone(const char *Cmd);
ab20cc35
MF
47int CmdHIDPack(const char *Cmd);
48int CmdHIDUnpack(const char *Cmd);
7fe9b0b7 49
50#endif
Impressum, Datenschutz