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
Method Details [hide private]

__init__(self, atr, mask=None)
(Constructor)

source code 
ATRCardType constructor.
atr:    the ATR of the CardType
mask:   an optional mask to be applied to the ATR for CardType matching
        default is None

Overrides: CardType.__init__

matches(self, atr, reader=None)

source code 

Returns true if the atr matches the masked CardType atr.

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