LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
logicalaccess::MifarePlusSL1StorageCardService Class Reference

#include <mifareplussl1storagecardservice.hpp>

Inheritance diagram for logicalaccess::MifarePlusSL1StorageCardService:
logicalaccess::MifareStorageCardService logicalaccess::StorageCardService logicalaccess::CardService

Public Member Functions

 MifarePlusSL1StorageCardService (std::shared_ptr< Chip > chip)
 
std::string getCSType () override
 
void erase (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse) override
 Erase a specific location on the card.
 
void writeData (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse, std::shared_ptr< AccessInfo > aiToWrite, const ByteVector &data, CardBehavior behaviorFlags) override
 Write data on a specific Mifare location, using given Mifare keys.
 
ByteVector readData (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse, size_t length, CardBehavior behaviorFlags) override
 Read data on a specific Mifare location, using given Mifare keys.
 
ByteVector readDataHeader (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse) override
 Read data header on a specific location, using given keys.
 
- Public Member Functions inherited from logicalaccess::MifareStorageCardService
 MifareStorageCardService (std::shared_ptr< Chip > chip)
 Constructor.
 
virtual ~MifareStorageCardService ()
 Destructor.
 
std::string getCSType () override
 
void erase (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse) override
 Erase a specific location on the card.
 
void writeData (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse, std::shared_ptr< AccessInfo > aiToWrite, const ByteVector &data, CardBehavior behaviorFlags) override
 Write data on a specific Mifare location, using given Mifare keys.
 
ByteVector readData (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse, size_t length, CardBehavior behaviorFlags) override
 Read data on a specific Mifare location, using given Mifare keys.
 
ByteVector readDataHeader (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse) override
 Read data header on a specific location, using given keys.
 
- Public Member Functions inherited from logicalaccess::StorageCardService
 StorageCardService (std::shared_ptr< Chip > chip)
 Constructor.
 
virtual ~StorageCardService ()
 
virtual void erase (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse)=0
 Erase a specific location on the card.
 
virtual void writeData (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse, std::shared_ptr< AccessInfo > aiToWrite, const ByteVector &data, CardBehavior behaviorFlags)=0
 Write data on a specific location, using given keys.
 
virtual ByteVector readData (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse, size_t length, CardBehavior behaviorFlags)=0
 Read data on a specific location, using given keys.
 
virtual ByteVector readDataHeader (std::shared_ptr< Location > location, std::shared_ptr< AccessInfo > aiToUse)=0
 Read data header on a specific location, using given keys.
 
SignatureResult IKS_getLastReadSignature ()
 
- Public Member Functions inherited from logicalaccess::CardService
virtual ~CardService ()=default
 
 CardService (std::shared_ptr< Chip > chip, CardServiceType serviceType)
 Constructor.
 
virtual std::string getCSType ()=0
 
std::shared_ptr< ChipgetChip () const
 
virtual CardServiceType getServiceType () const
 Get the card service type.
 

Private Member Functions

void authenticate_if_needed (std::shared_ptr< AccessInfo >)
 

Private Attributes

bool has_been_authenticated_
 

Additional Inherited Members

- Static Public Attributes inherited from logicalaccess::StorageCardService
static constexpr const CardServiceType service_type_ = CST_STORAGE
 
- Protected Member Functions inherited from logicalaccess::MifareStorageCardService
std::shared_ptr< MifareChipgetMifareChip () const
 
- Protected Attributes inherited from logicalaccess::StorageCardService
SignatureResult last_read_signature_
 
- Protected Attributes inherited from logicalaccess::CardService
std::shared_ptr< Chipd_chip
 Chip object.
 
CardServiceType d_serviceType
 Card service type.
 

Constructor & Destructor Documentation

◆ MifarePlusSL1StorageCardService()

logicalaccess::MifarePlusSL1StorageCardService::MifarePlusSL1StorageCardService ( std::shared_ptr< Chip chip)
explicit

Member Function Documentation

◆ authenticate_if_needed()

void logicalaccess::MifarePlusSL1StorageCardService::authenticate_if_needed ( std::shared_ptr< AccessInfo ai)
private

◆ erase()

void logicalaccess::MifarePlusSL1StorageCardService::erase ( std::shared_ptr< Location location,
std::shared_ptr< AccessInfo aiToUse 
)
overridevirtual

Erase a specific location on the card.

Parameters
locationThe data location.
aiToUseThe key's informations to use to delete.

Reimplemented from logicalaccess::MifareStorageCardService.

◆ getCSType()

std::string logicalaccess::MifarePlusSL1StorageCardService::getCSType ( )
inlineoverridevirtual

◆ readData()

ByteVector logicalaccess::MifarePlusSL1StorageCardService::readData ( std::shared_ptr< Location location,
std::shared_ptr< AccessInfo aiToUse,
size_t  length,
CardBehavior  behaviorFlags 
)
overridevirtual

Read data on a specific Mifare location, using given Mifare keys.

Parameters
locationThe data location.
aiToUseThe key's informations to use for write access.
dataWill contain data after reading.
lengthto read.
behaviorFlagsFlags which determines the behavior.
Returns
Data readed

Reimplemented from logicalaccess::MifareStorageCardService.

◆ readDataHeader()

ByteVector logicalaccess::MifarePlusSL1StorageCardService::readDataHeader ( std::shared_ptr< Location location,
std::shared_ptr< AccessInfo aiToUse 
)
overridevirtual

Read data header on a specific location, using given keys.

Parameters
locationThe data location.
aiToUseThe key's informations to use.
dataWill contain data after reading.
dataLengthData's length to read.
Returns
Data header length.

Reimplemented from logicalaccess::MifareStorageCardService.

◆ writeData()

void logicalaccess::MifarePlusSL1StorageCardService::writeData ( std::shared_ptr< Location location,
std::shared_ptr< AccessInfo aiToUse,
std::shared_ptr< AccessInfo aiToWrite,
const ByteVector data,
CardBehavior  behaviorFlags 
)
overridevirtual

Write data on a specific Mifare location, using given Mifare keys.

Parameters
locationThe data location.
aiToUseThe key's informations to use for write access.
aiToWriteThe key's informations to change.
dataData to write.
behaviorFlagsFlags which determines the behavior.

Reimplemented from logicalaccess::MifareStorageCardService.

Member Data Documentation

◆ has_been_authenticated_

bool logicalaccess::MifarePlusSL1StorageCardService::has_been_authenticated_
private

We perform AES authentication at most once, for performance reason.


The documentation for this class was generated from the following files: