smartcard.CardType.CardType

# ``smartcard`.`CardType`.`CardType``

class documentation

`class CardType(object):`

Known subclasses: `smartcard.CardType.AnyCardType`, `smartcard.CardType.ATRCardType`

View In Hierarchy

Abstract base class for CardTypes.

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

Method | `__init__` | CardType constructor.
Method | `matches` | Returns true if atr and card connected match the `CardType`.

def __init__(self):
overridden in `smartcard.CardType.AnyCardType`, `smartcard.CardType.ATRCardType`

CardType constructor.

def matches(self, atr, reader=None):
overridden in `smartcard.CardType.AnyCardType`, `smartcard.CardType.ATRCardType`

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.