cryptnoxpy.factory

Module for getting Cryptnox cards information and getting instance of card from connection

Module Contents

Functions

get_card(connection: cryptnoxpy.connection.Connection, debug: bool = False) → cryptnoxpy.card.Base

Get card instance that is using given connection.

_all_subclasses(cls)

_select(connection, apdu, card_type, debug: bool = False) → Tuple[Any, Any]

_serial_number(connection, debug: bool = False)

cryptnoxpy.factory.get_card(connection: cryptnoxpy.connection.Connection, debug: bool = False) cryptnoxpy.card.Base

Get card instance that is using given connection.

Parameters
  • connection (Connection) – Connection to use for operation

  • debug (bool) – Prints information about communication

Returns

Instance of card

Return type

Base

Raises

CardException – Card with given serial number not found

cryptnoxpy.factory._all_subclasses(cls)
cryptnoxpy.factory._select(connection, apdu, card_type, debug: bool = False) Tuple[Any, Any]
cryptnoxpy.factory._serial_number(connection, debug: bool = False)