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

Class ATRCardType

source code


The ATRCardType defines a card from an ATR and a mask.

Instance Methods [hide private]
 
__init__(self, atr, mask=None)
ATRCardType constructor.
source code
 
matches(self, atr, reader=None)
Returns true if the atr matches the masked CardType atr.
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, atr, mask=None)
(Constructor)

source code 

ATRCardType constructor.

Parameters:
  • atr - the ATR of the CardType
  • mask - an optional mask to be applied to the ATR for CardType matching default is None
Overrides: object.__init__

matches(self, atr, reader=None)

source code 

Returns true if the atr matches the masked CardType atr.

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

    When atr is compared to the CardType ATR, matches returns true if and only if CardType.atr & CardType.mask = atr & CardType.mask, where & is the bitwise logical AND.

Overrides: CardType.matches