|
| MifareOK5553Commands () |
| Constructor.
|
|
| MifareOK5553Commands (std::string) |
|
virtual | ~MifareOK5553Commands () |
| Destructor.
|
|
ByteVector | readBinary (unsigned char blockno, size_t len) override |
| Read bytes from the card.
|
|
void | updateBinary (unsigned char blockno, const ByteVector &buf) override |
| Write bytes to the card.
|
|
bool | loadKey (unsigned char keyno, MifareKeyType keytype, std::shared_ptr< MifareKey > key, bool vol=false) override |
| Load a key to the reader.
|
|
void | loadKey (std::shared_ptr< Location > location, MifareKeyType keytype, std::shared_ptr< MifareKey > key) override |
| Load a key on a given location.
|
|
void | authenticate (unsigned char blockno, unsigned char keyno, MifareKeyType keytype) override |
| Authenticate a block, given a key number.
|
|
void | authenticate (unsigned char blockno, std::shared_ptr< KeyStorage > key_storage, MifareKeyType keytype) override |
| Authenticate a block, given a key number.
|
|
void | increment (unsigned char blockno, unsigned int value) override |
| Increment a block value.
|
|
void | decrement (unsigned char blockno, unsigned int value) override |
| Decrement a block value.
|
|
virtual std::shared_ptr< OK5553ReaderCardAdapter > | getOK5553ReaderCardAdapter () |
| Get the OK5553 reader/card adapter.
|
|
Public Member Functions inherited from logicalaccess::MifareCommands |
| MifareCommands () |
|
| MifareCommands (std::string ct) |
|
virtual ByteVector | readSector (int sector, int start_block, std::shared_ptr< MifareKey > keyA, std::shared_ptr< MifareKey > keyB, const MifareAccessInfo::SectorAccessBits &sab, bool readtrailer=false) final |
|
virtual void | writeSector (int sector, int start_block, const ByteVector &buf, std::shared_ptr< MifareKey > keyA, std::shared_ptr< MifareKey > keyB, const MifareAccessInfo::SectorAccessBits &sab, unsigned char userbyte=0x00, MifareAccessInfo::SectorAccessBits *newsab=nullptr, std::shared_ptr< MifareKey > newkeyA=std::shared_ptr< MifareKey >(), std::shared_ptr< MifareKey > newkeyB=std::shared_ptr< MifareKey >()) final |
|
virtual ByteVector | readSectors (int start_sector, int stop_sector, int start_block, std::shared_ptr< MifareKey > keyA, std::shared_ptr< MifareKey > keyB, const MifareAccessInfo::SectorAccessBits &sab) final |
|
virtual void | writeSectors (int start_sector, int stop_sector, int start_block, const ByteVector &buf, std::shared_ptr< MifareKey > keyA, std::shared_ptr< MifareKey > keyB, const MifareAccessInfo::SectorAccessBits &sab, unsigned char userbyte=0x00, MifareAccessInfo::SectorAccessBits *newsab=nullptr, std::shared_ptr< MifareKey > newkeyA=std::shared_ptr< MifareKey >(), std::shared_ptr< MifareKey > newkeyB=std::shared_ptr< MifareKey >()) final |
|
unsigned int | getSectorFromMAD (long aid, std::shared_ptr< MifareKey > madKeyA) |
| Get the sector referenced by the AID from the MAD.
|
|
void | setSectorToMAD (long aid, unsigned int sector, std::shared_ptr< MifareKey > madKeyA, std::shared_ptr< MifareKey > madKeyB) |
| Set the sector referenced by the AID to the MAD.
|
|
void | authenticate (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > ai, bool write=false) |
| Authenticate on a given location.
|
|
void | changeKeys (MifareKeyType keytype, std::shared_ptr< MifareKey > key, std::shared_ptr< MifareKey > newkeyA, std::shared_ptr< MifareKey > newkeyB, unsigned int sector, MifareAccessInfo::SectorAccessBits *newsab, unsigned char userbyte=0x00) |
|
void | changeKeys (std::shared_ptr< MifareKey > newkeyA, std::shared_ptr< MifareKey > newkeyB, unsigned int sector, MifareAccessInfo::SectorAccessBits *newsab, unsigned char userbyte=0x00) |
|
void | authenticate (MifareKeyType keyType, std::shared_ptr< MifareKey > key, int sector, int block, bool write) |
| Authenticate for a targeted block.
|
|
virtual ByteVector | readBinary (unsigned char blockno, size_t len)=0 |
| Read bytes from the card.
|
|
virtual void | updateBinary (unsigned char blockno, const ByteVector &buf)=0 |
| Write bytes to the card.
|
|
virtual bool | loadKey (unsigned char keyno, MifareKeyType keytype, std::shared_ptr< MifareKey > key, bool vol=false)=0 |
| Load a key to the reader.
|
|
virtual void | loadKey (std::shared_ptr< Location > location, MifareKeyType keytype, std::shared_ptr< MifareKey > key)=0 |
| Load a key on a given location.
|
|
virtual void | authenticate (unsigned char blockno, unsigned char keyno, MifareKeyType keytype)=0 |
| Authenticate a block, given a key number.
|
|
virtual void | authenticate (unsigned char blockno, std::shared_ptr< KeyStorage > key_storage, MifareKeyType keytype)=0 |
| Authenticate a block, given a key number.
|
|
virtual void | increment (uint8_t blockno, uint32_t value)=0 |
|
virtual void | decrement (uint8_t blockno, uint32_t value)=0 |
|
bool | writeValueBlock (uint8_t blockno, int32_t value, uint8_t backup_blockno) |
|
bool | readValueBlock (uint8_t blockno, int32_t &value, uint8_t &backup_block) |
|
Public Member Functions inherited from logicalaccess::Commands |
| Commands ()=delete |
| Constructor.
|
|
virtual | ~Commands () |
|
std::shared_ptr< Chip > | getChip () const override |
| Get the chip.
|
|
virtual void | setChip (std::shared_ptr< Chip > chip) |
| Set the chip.
|
|
std::shared_ptr< ReaderCardAdapter > | getReaderCardAdapter () const override |
| Get the reader/card adapter.
|
|
virtual void | setReaderCardAdapter (std::shared_ptr< ReaderCardAdapter > adapter) |
| Set the reader/card adapter.
|
|
virtual const std::string & | getCmdType () const |
| Get the cmd name.
|
|
virtual void | setCmdType (const std::string &command_type) |
| Set the cmd name.
|
|
Public Member Functions inherited from logicalaccess::ICommands |
virtual | ~ICommands ()=default |
|
virtual std::shared_ptr< Chip > | getChip () const =0 |
| Get the chip.
|
|
virtual std::shared_ptr< ReaderCardAdapter > | getReaderCardAdapter () const =0 |
| Get the reader/card adapter.
|
|
A Mifare OK5553 commands base class.