Package smartcard :: Module CardType :: Class CardType
[hide private]
[frames] | no frames]

Class CardType

source code


Abstract base class for CardTypes.

Known sub-classes: smartcard.CardType.AnyCardType smartcard.CardType.ATRCardType.

Instance Methods [hide private]
 
__init__(self)
CardType constructor.
source code
 
matches(self, atr, reader=None)
Returns true if atr and card connected match the CardType.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

CardType constructor.

Overrides: object.__init__

matches(self, atr, reader=None)

source code 

Returns true if atr and card connected match the CardType.

Parameters:
  • atr - the atr to chek for matching
  • reader - the reader (optional); default is None

    The reader can be use in some sub-classes to do advanced matching that require connecting to the card.