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

A SAMBasicKeyEntry Key class. More...

#include <sambasickeyentry.hpp>

Inheritance diagram for logicalaccess::SAMBasicKeyEntry:
logicalaccess::SAMKeyEntry< T, S >

Public Member Functions

virtual ~SAMBasicKeyEntry ()
 Destructor.
 
size_t getLength () const
 Get the key length.
 
std::vector< ByteVectorgetKeysData () const
 Get the keys data.
 
virtual void setKeysData (std::vector< ByteVector > keys, SAMKeyType type)
 Set the keys data.
 
unsigned char * getData () const
 Get the key data.
 
void setDiversify (bool diversify)
 Set if the key is diversified on the card.
 
bool getDiversify () const
 Get if the key is diversified on the card.
 
void setKeyType (SAMKeyType keyType)
 Set the key type.
 
SAMKeyType getKeyType () const
 Get the key type.
 
virtual void serialize (boost::property_tree::ptree &parentNode)
 Serialize the current object to XML.
 
virtual void unSerialize (boost::property_tree::ptree &node)
 UnSerialize a XML node to the current object.
 
virtual std::string getDefaultXmlNodeName () const
 Get the default Xml Node name for this object.
 
virtual bool operator== (const SAMBasicKeyEntry &key) const
 Equality operator.
 
bool operator!= (const SAMBasicKeyEntry &key) const
 Inequality operator.
 
size_t getSingleLength () const
 
unsigned char getUpdateMask () const
 
void setUpdateMask (unsigned char c)
 
KeyEntryUpdateSettings getUpdateSettings ()
 
void setUpdateSettings (const KeyEntryUpdateSettings &t)
 

Static Public Member Functions

static std::string SAMKeyEntryTypeStr (SAMKeyType t)
 Get the SAM Key Type in string format.
 

Protected Member Functions

 SAMBasicKeyEntry ()
 
 SAMBasicKeyEntry (const SAMBasicKeyEntry &copy)
 
 SAMBasicKeyEntry (const std::string &str, const std::string &str1, const std::string &str2)
 
 SAMBasicKeyEntry (const void **buf, size_t buflen, char numberkey)
 

Protected Attributes

unsigned char * d_key
 The key bytes;.
 
bool d_diversify
 Diversify the key on the card.
 
SAMKeyType d_keyType
 The SAM key type.
 
unsigned char d_updatemask
 

Detailed Description

A SAMBasicKeyEntry Key class.

Constructor & Destructor Documentation

◆ ~SAMBasicKeyEntry()

logicalaccess::SAMBasicKeyEntry::~SAMBasicKeyEntry ( )
virtual

Destructor.

◆ SAMBasicKeyEntry() [1/4]

logicalaccess::SAMBasicKeyEntry::SAMBasicKeyEntry ( )
protected

◆ SAMBasicKeyEntry() [2/4]

logicalaccess::SAMBasicKeyEntry::SAMBasicKeyEntry ( const SAMBasicKeyEntry copy)
protected

◆ SAMBasicKeyEntry() [3/4]

logicalaccess::SAMBasicKeyEntry::SAMBasicKeyEntry ( const std::string &  str,
const std::string &  str1,
const std::string &  str2 
)
protected

◆ SAMBasicKeyEntry() [4/4]

logicalaccess::SAMBasicKeyEntry::SAMBasicKeyEntry ( const void **  buf,
size_t  buflen,
char  numberkey 
)
protected

Member Function Documentation

◆ getData()

unsigned char * logicalaccess::SAMBasicKeyEntry::getData ( ) const
inline

Get the key data.

Returns
The key data.

◆ getDefaultXmlNodeName()

std::string logicalaccess::SAMBasicKeyEntry::getDefaultXmlNodeName ( ) const
virtual

Get the default Xml Node name for this object.

Returns
The Xml node name.

◆ getDiversify()

bool logicalaccess::SAMBasicKeyEntry::getDiversify ( ) const
inline

Get if the key is diversified on the card.

Returns
True if the key is diversified on the card, false otherwise.

◆ getKeysData()

std::vector< ByteVector > logicalaccess::SAMBasicKeyEntry::getKeysData ( ) const

Get the keys data.

Returns
The keys data.

◆ getKeyType()

SAMKeyType logicalaccess::SAMBasicKeyEntry::getKeyType ( ) const
inline

Get the key type.

Returns
The key type.

◆ getLength()

size_t logicalaccess::SAMBasicKeyEntry::getLength ( ) const

Get the key length.

Returns
The key length.

◆ getSingleLength()

size_t logicalaccess::SAMBasicKeyEntry::getSingleLength ( ) const

◆ getUpdateMask()

unsigned char logicalaccess::SAMBasicKeyEntry::getUpdateMask ( ) const
inline

◆ getUpdateSettings()

KeyEntryUpdateSettings logicalaccess::SAMBasicKeyEntry::getUpdateSettings ( )

◆ operator!=()

bool logicalaccess::SAMBasicKeyEntry::operator!= ( const SAMBasicKeyEntry key) const
inline

Inequality operator.

Parameters
aiSAM key to compare.
Returns
True if inequals, false otherwise.

◆ operator==()

bool logicalaccess::SAMBasicKeyEntry::operator== ( const SAMBasicKeyEntry key) const
virtual

Equality operator.

Parameters
aiSAM key to compare.
Returns
True if equals, false otherwise.

◆ SAMKeyEntryTypeStr()

std::string logicalaccess::SAMBasicKeyEntry::SAMKeyEntryTypeStr ( SAMKeyType  t)
static

Get the SAM Key Type in string format.

Returns
The key type in string.

◆ serialize()

void logicalaccess::SAMBasicKeyEntry::serialize ( boost::property_tree::ptree &  parentNode)
virtual

Serialize the current object to XML.

Parameters
parentNodeThe parent node.

◆ setDiversify()

void logicalaccess::SAMBasicKeyEntry::setDiversify ( bool  diversify)
inline

Set if the key is diversified on the card.

Parameters
diversifyTrue if the key is diversified on the card, false otherwise.

◆ setKeysData()

void logicalaccess::SAMBasicKeyEntry::setKeysData ( std::vector< ByteVector keys,
SAMKeyType  type 
)
virtual

Set the keys data.

Reimplemented in logicalaccess::SAMKeyEntry< T, S >.

◆ setKeyType()

void logicalaccess::SAMBasicKeyEntry::setKeyType ( SAMKeyType  keyType)
inline

Set the key type.

Parameters
keyTypeThe key type.

◆ setUpdateMask()

void logicalaccess::SAMBasicKeyEntry::setUpdateMask ( unsigned char  c)
inline

◆ setUpdateSettings()

void logicalaccess::SAMBasicKeyEntry::setUpdateSettings ( const KeyEntryUpdateSettings t)

◆ unSerialize()

void logicalaccess::SAMBasicKeyEntry::unSerialize ( boost::property_tree::ptree &  node)
virtual

UnSerialize a XML node to the current object.

Parameters
nodeThe XML node.

Member Data Documentation

◆ d_diversify

bool logicalaccess::SAMBasicKeyEntry::d_diversify
protected

Diversify the key on the card.

◆ d_key

unsigned char* logicalaccess::SAMBasicKeyEntry::d_key
protected

The key bytes;.

◆ d_keyType

SAMKeyType logicalaccess::SAMBasicKeyEntry::d_keyType
protected

The SAM key type.

◆ d_updatemask

unsigned char logicalaccess::SAMBasicKeyEntry::d_updatemask
protected

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