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

The DESFire base chip class. More...

#include <desfirechip.hpp>

Inheritance diagram for logicalaccess::DESFireChip:
logicalaccess::Chip logicalaccess::IChip logicalaccess::DESFireEV1Chip

Public Member Functions

 DESFireChip ()
 Constructor.
 
 DESFireChip (std::string ct)
 Constructor.
 
virtual ~DESFireChip ()
 Destructor.
 
std::string getGenericCardType () const override
 Get the generic card type.
 
std::shared_ptr< LocationNodegetRootLocationNode () override
 Get the root location node.
 
virtual std::shared_ptr< DESFireLocationgetApplicationLocation ()
 Get the application location information.
 
std::shared_ptr< CardServicegetService (CardServiceType serviceType) override
 Get a card service for this card provider.
 
std::shared_ptr< AccessInfocreateAccessInfo () const override
 Create default DESFire access informations.
 
std::shared_ptr< LocationcreateLocation () const override
 Create default DESFire location.
 
std::shared_ptr< DESFireCommandsgetDESFireCommands () const
 Get the DESFire commands.
 
void setHasRealUID (bool enabled)
 
bool hasRealUID () const
 
std::shared_ptr< DESFireCryptogetCrypto () const
 Get the internal DESFire crypto.
 
void setCrypto (std::shared_ptr< DESFireCrypto > crypto)
 Set the internal DESFire crypto.
 
- Public Member Functions inherited from logicalaccess::Chip
 Chip ()
 Constructor.
 
 Chip (std::string cardtype)
 Constructor.
 
virtual ~Chip ()
 Destructor.
 
const std::string & getCardType () const override
 Get the card type of the chip.
 
std::string getGenericCardType () const override
 Get the generic card type.
 
virtual std::shared_ptr< LocationNodegetRootLocationNode ()
 Get the root location node.
 
std::shared_ptr< CommandsgetCommands () const override
 Get the commands.
 
void setCommands (std::shared_ptr< Commands > commands)
 Set commands.
 
ByteVector getChipIdentifier () const override
 Get the chip identifier.
 
virtual void setChipIdentifier (ByteVector identifier)
 Set the chip identifier.
 
ChipPowerStatus getPowerStatus () const
 Get the chip power status.
 
void setPowerStatus (ChipPowerStatus powerStatus)
 Set the chip power status.
 
unsigned char getReceptionLevel () const
 Get the chip reception level.
 
void setReceptionLevel (unsigned char receptionLevel)
 Set the chip reception level.
 
virtual std::shared_ptr< AccessInfocreateAccessInfo () const
 Create default access informations.
 
virtual std::shared_ptr< LocationcreateLocation () const
 Create default location.
 
std::shared_ptr< CardServicegetService (CardServiceType serviceType) override
 Get a card service for this chip.
 
template<typename T >
std::shared_ptr< T > getService ()
 
bool operator< (const Chip &chip) const
 
- Public Member Functions inherited from logicalaccess::IChip
virtual ~IChip ()=default
 
virtual const std::string & getCardType () const =0
 Get the card type of the chip.
 
virtual std::string getGenericCardType () const =0
 Get the generic card type.
 
virtual std::shared_ptr< CommandsgetCommands () const =0
 Get the commands.
 
virtual ByteVector getChipIdentifier () const =0
 Get the chip identifier.
 
virtual std::shared_ptr< CardServicegetService (CardServiceType serviceType)=0
 Get a card service for this chip.
 

Protected Attributes

std::shared_ptr< DESFireCryptod_crypto
 Crypto instance for security manipulation.
 
bool has_real_uid_
 
- Protected Attributes inherited from logicalaccess::Chip
std::string d_cardtype
 The card type of the profile.
 
ByteVector d_chipIdentifier
 The chip identifier.
 
ChipPowerStatus d_powerStatus
 The chip power status. Most chip doesn't have his own power supply.
 
std::shared_ptr< Commandsd_commands
 Commands object.
 
unsigned char d_receptionLevel
 The chip reception level.
 

Detailed Description

The DESFire base chip class.

Constructor & Destructor Documentation

◆ DESFireChip() [1/2]

logicalaccess::DESFireChip::DESFireChip ( )

Constructor.

◆ DESFireChip() [2/2]

logicalaccess::DESFireChip::DESFireChip ( std::string  ct)
explicit

Constructor.

Parameters
ctThe card type.

◆ ~DESFireChip()

logicalaccess::DESFireChip::~DESFireChip ( )
virtual

Destructor.

Member Function Documentation

◆ createAccessInfo()

std::shared_ptr< AccessInfo > logicalaccess::DESFireChip::createAccessInfo ( ) const
overridevirtual

Create default DESFire access informations.

Returns
Default DESFire access informations.

Reimplemented from logicalaccess::Chip.

◆ createLocation()

std::shared_ptr< Location > logicalaccess::DESFireChip::createLocation ( ) const
overridevirtual

Create default DESFire location.

Returns
Default DESFire location.

Reimplemented from logicalaccess::Chip.

Reimplemented in logicalaccess::DESFireEV1Chip.

◆ getApplicationLocation()

std::shared_ptr< DESFireLocation > logicalaccess::DESFireChip::getApplicationLocation ( )
virtual

Get the application location information.

Returns
The location.

Reimplemented in logicalaccess::DESFireEV1Chip.

◆ getCrypto()

std::shared_ptr< DESFireCrypto > logicalaccess::DESFireChip::getCrypto ( ) const
inline

Get the internal DESFire crypto.

Returns
The internal DESFire crypto.

◆ getDESFireCommands()

std::shared_ptr< DESFireCommands > logicalaccess::DESFireChip::getDESFireCommands ( ) const
inline

Get the DESFire commands.

Returns
The DESFire commands.

◆ getGenericCardType()

std::string logicalaccess::DESFireChip::getGenericCardType ( ) const
inlineoverridevirtual

Get the generic card type.

Returns
The generic card type.

Reimplemented from logicalaccess::Chip.

◆ getRootLocationNode()

std::shared_ptr< LocationNode > logicalaccess::DESFireChip::getRootLocationNode ( )
overridevirtual

Get the root location node.

Returns
The root location node.

Reimplemented from logicalaccess::Chip.

Reimplemented in logicalaccess::DESFireEV1Chip.

◆ getService()

std::shared_ptr< CardService > logicalaccess::DESFireChip::getService ( CardServiceType  serviceType)
overridevirtual

Get a card service for this card provider.

Parameters
serviceTypeThe card service type.
Returns
The card service.

Reimplemented from logicalaccess::Chip.

Reimplemented in logicalaccess::DESFireEV1Chip.

◆ hasRealUID()

bool logicalaccess::DESFireChip::hasRealUID ( ) const
inline

Does the current chip identifier represents the "real uid" or is it a "random UID" ?

This flag is updated when we fetch the real UID for the first time.

◆ setCrypto()

void logicalaccess::DESFireChip::setCrypto ( std::shared_ptr< DESFireCrypto crypto)
inline

Set the internal DESFire crypto.

Parameters
cryptoThe internal DESFire crypto.

◆ setHasRealUID()

void logicalaccess::DESFireChip::setHasRealUID ( bool  enabled)
inline

Set the flag that tells us wether or now the current chip identifier is real and not random.

Member Data Documentation

◆ d_crypto

std::shared_ptr<DESFireCrypto> logicalaccess::DESFireChip::d_crypto
protected

Crypto instance for security manipulation.

◆ has_real_uid_

bool logicalaccess::DESFireChip::has_real_uid_
protected

Is random UUID enabled or not ? This is detected when creating the chip object in PCSC Reader.


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