NAME
DesfireAPI :: Core of the reading functions
COPYRIGHT
(c) 2009 SpringCard - www.springcard.com
DESCRIPTION
Implementation of the various DESFIRE read functions.
NAME
ReadData
DESCRIPTION
Allows to read data from Standard Data File or Backup Data File
SYNOPSIS
[[sprox_desfire.dll]] SWORD SPROX_Desfire_ReadData(BYTE file_id, BYTE comm_mode, DWORD from_offset, DWORD max_count, BYTE data[], DWORD *done_count); [[sprox_desfire_ex.dll]] SWORD SPROXx_Desfire_ReadData(SPROX_INSTANCE rInst, BYTE file_id, BYTE comm_mode, DWORD from_offset, DWORD max_count, BYTE data[], DWORD *done_count); [[pcsc_desfire.dll]] LONG SCardDesfire_ReadData(SCARDHANDLE hCard, BYTE file_id, BYTE comm_mode, DWORD from_offset, DWORD max_count, BYTE data[], DWORD *done_count);
INPUTS
BYTE file_id : File IDentifier BYTE comm_mode : file's communication settings (DF_COMM_MODE_PLAIN, DF_COMM_MODE_MACED, DF_COMM_MODE_PLAIN2 or DF_COMM_MODE_ENCIPHERED)(see chapter 3.2 of datasheet of mifare DesFire MF3ICD40 for more information) DWORD from_offset : starting position for the read operation DWORD max_count : maximum data length to read. Set to 0 to read whole file BYTE data[] : buffer to receive the data DWORD *done_count : actual data length read
RETURNS
DF_OPERATION_OK : success, data has been read Other code if internal or communication error has occured.
SEE ALSO
ReadData2
NAME
ReadData2
DESCRIPTION
Allows to read data from Standard Data File or Backup Data File
SYNOPSIS
[[sprox_desfire.dll]] SWORD SPROX_Desfire_ReadData2(BYTE file_id, DWORD from_offset, DWORD max_count, BYTE data[], DWORD *done_count); [[sprox_desfire_ex.dll]] SWORD SPROXx_Desfire_ReadData2(SPROX_INSTANCE rInst, BYTE file_id, DWORD from_offset, DWORD max_count, BYTE data[], DWORD *done_count); [[pcsc_desfire.dll]] LONG SCardDesfire_ReadData2(SCARDHANDLE hCard, BYTE file_id, DWORD from_offset, DWORD max_count, BYTE data[], DWORD *done_count);
INPUTS
BYTE file_id : File IDentifier DWORD from_offset : starting position for the read operation in bytes DWORD max_count : maximum data length to read. Set to 0 to read whole file BYTE data[] : buffer to receive the data DWORD *done_count : actual data length read
RETURNS
DF_OPERATION_OK : success, data has been read Other code if internal or communication error has occured.
SEE ALSO
ReadData