ODALID Librairie Carte MIFARE v0.5
Chargement...
Recherche...
Aucune correspondance
Sw_Mf_Classic.h
Aller à la documentation de ce fichier.
1/*
2*
3* Copyright (c) 2009-2021 ODALID - https://odalid.com
4*
5*/
6
15#ifndef SW_MF_CLASSIC_H
16#define SW_MF_CLASSIC_H
17
18#include "Librairie.h"
19#include "TypeDefs.h"
20#include "Hardware.h"
21
22#if defined (__cplusplus)
23extern "C" {
24#endif
25
26//Valid access conditions for Bc0, Bc1 and Bc2
27#define ACC_BLOCK_TRANSPORT 0x00
28#define ACC_BLOCK_READWRITE 0x04
29#define ACC_BLOCK_VALUE 0x06
30//Valid access conditions for Bc3
31#define ACC_AUTH_TRANSPORT 0x01
32#define ACC_AUTH_NORMAL 0x03
34#define AuthKeyA TRUE
35#define AuthKeyB FALSE
43 ReaderName *pName,
44 BOOL AuthKey,
45 uint8_t *pKey,
46 uint8_t KeyIndex
47 );
48
55 ReaderName *pName,
56 uint8_t *pKeyA,
57 uint8_t *pKeyB,
58 uint8_t KeyIndex
59 );
60
67 ReaderName *pName,
68 uint8_t Type
69 );
70
77 ReaderName *pName,
78 BOOL AuthKey,
79 BOOL internal_Key,
80 uint8_t Sector,
81 uint8_t *pKey,
82 uint8_t KeyIndex
83 );
84
91 ReaderName *pName,
92 BOOL Auth,
93 uint8_t Block,
94 uint8_t *pData,
95 BOOL AuthKey,
96 uint8_t KeyIndex
97 );
98
105 ReaderName *pName,
106 BOOL Auth,
107 uint8_t Block,
108 uint8_t *pData,
109 BOOL AuthKey,
110 uint8_t KeyIndex
111 );
112
119 ReaderName *pName,
120 BOOL Auth,
121 uint8_t Sector,
122 uint8_t *pData,
123 BOOL AuthKey,
124 uint8_t KeyIndex
125 );
126
133 ReaderName *pName,
134 BOOL Auth,
135 uint8_t Sector,
136 uint8_t *pData,
137 BOOL AuthKey,
138 uint8_t KeyIndex
139 );
140
147 ReaderName *pName,
148 BOOL Auth,
149 uint8_t Sector,
150 uint8_t OldKeyIndex,
151 uint8_t *pNewKeyA,
152 uint8_t *pNewKeyB,
153 uint8_t Bc0,
154 uint8_t Bc1,
155 uint8_t Bc2,
156 uint8_t Bc3,
157 BOOL AuthKey
158 );
159
166 ReaderName *pName,
167 BOOL Auth,
168 uint8_t Block,
169 uint32_t *pValue,
170 BOOL AuthKey,
171 uint8_t KeyIndex
172 );
173
180 ReaderName *pName,
181 BOOL Auth,
182 uint8_t Block,
183 uint32_t Value,
184 BOOL AuthKey,
185 uint8_t KeyIndex
186 );
187
194 ReaderName *pName,
195 BOOL Auth,
196 uint8_t Block,
197 uint32_t Value,
198 uint8_t trans_Block,
199 BOOL AuthKey,
200 uint8_t KeyIndex
201 );
202
209 ReaderName *pName,
210 BOOL Auth,
211 uint8_t Block,
212 uint32_t Value,
213 uint8_t trans_Block,
214 BOOL AuthKey,
215 uint8_t KeyIndex
216 );
217
224 ReaderName *pName,
225 BOOL Auth,
226 uint8_t Block,
227 uint8_t trans_Block,
228 BOOL AuthKey,
229 uint8_t KeyIndex
230 );
231
232#if defined (__cplusplus)
233}
234#endif
235
236#endif /*SW_MF_CLASSIC_H*/
ODALID_LIB int16_t Mf_Classic_Write_Value(ReaderName *pName, BOOL Auth, uint8_t Block, uint32_t Value, BOOL AuthKey, uint8_t KeyIndex)
Écriture d'une Value dans un Block de la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_Read_Sector(ReaderName *pName, BOOL Auth, uint8_t Sector, uint8_t *pData, BOOL AuthKey, uint8_t KeyIndex)
Lecture d’un Secteur de la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_Write_Block(ReaderName *pName, BOOL Auth, uint8_t Block, uint8_t *pData, BOOL AuthKey, uint8_t KeyIndex)
Écriture d’un Block de la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_Authenticate(ReaderName *pName, BOOL AuthKey, BOOL internal_Key, uint8_t Sector, uint8_t *pKey, uint8_t KeyIndex)
Phase d'Authentification pour la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_Read_Value(ReaderName *pName, BOOL Auth, uint8_t Block, uint32_t *pValue, BOOL AuthKey, uint8_t KeyIndex)
Lecture de la Value contenue dans le Block de la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_LoadKey(ReaderName *pName, BOOL AuthKey, uint8_t *pKey, uint8_t KeyIndex)
Chargement des clés MIFARE dans le secure element du lecteur pour lecteurs CDC1 / CDC2 / TCP1 et TCP2...
ODALID_LIB int16_t Mf_Classic_Decrement_Value(ReaderName *pName, BOOL Auth, uint8_t Block, uint32_t Value, uint8_t trans_Block, BOOL AuthKey, uint8_t KeyIndex)
Décrémentation du Block de la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_UpdadeAccessBlock(ReaderName *pName, BOOL Auth, uint8_t Sector, uint8_t OldKeyIndex, uint8_t *pNewKeyA, uint8_t *pNewKeyB, uint8_t Bc0, uint8_t Bc1, uint8_t Bc2, uint8_t Bc3, BOOL AuthKey)
Mise à jour des conditions d'accès et des clés de sécurité
ODALID_LIB int16_t Mf_Classic_LoadKey2(ReaderName *pName, uint8_t *pKeyA, uint8_t *pKeyB, uint8_t KeyIndex)
Chargement des clés MIFARE dans le secure element du lecteur pour lecteurs AccessControl / CDC1 / CDC...
ODALID_LIB int16_t Mf_Classic_Write_Sector(ReaderName *pName, BOOL Auth, uint8_t Sector, uint8_t *pData, BOOL AuthKey, uint8_t KeyIndex)
Ecriture d’un Secteur de la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_Increment_Value(ReaderName *pName, BOOL Auth, uint8_t Block, uint32_t Value, uint8_t trans_Block, BOOL AuthKey, uint8_t KeyIndex)
Incrément de la Value du Block de la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_PersonalizeUID(ReaderName *pName, uint8_t Type)
Personnalisation de l'UID.
ODALID_LIB int16_t Mf_Classic_Read_Block(ReaderName *pName, BOOL Auth, uint8_t Block, uint8_t *pData, BOOL AuthKey, uint8_t KeyIndex)
Lecture d’un Block de la carte MIFARE Classic.
ODALID_LIB int16_t Mf_Classic_Restore_Value(ReaderName *pName, BOOL Auth, uint8_t Block, uint8_t trans_Block, BOOL AuthKey, uint8_t KeyIndex)
Restauration de la Value.
uint8_t BOOL
Definition TypeDefs.h:97
unsigned long int uint32_t
32 bit non signe
Definition TypeDefs.h:51
short int16_t
16 bit signe
Definition TypeDefs.h:72
unsigned char uint8_t
BOOL.
Definition TypeDefs.h:37
Objet contenant les informations du Reader.
Definition Hardware.h:38