:py:mod:`cryptnoxpy.exceptions` =============================== .. py:module:: cryptnoxpy.exceptions .. autoapi-nested-parse:: Module containing all exceptions that CryptnoxPy module can raise. Module Contents --------------- .. py:exception:: CryptnoxException Bases: :py:obj:`Exception` Base exception for the class exceptions. .. py:exception:: CardClosedException Bases: :py:obj:`Exception` The card wasn't opened with PIN code or challenge-response .. py:exception:: CardException Bases: :py:obj:`CryptnoxException` No card was detected in the card reader. .. py:exception:: CardTypeException Bases: :py:obj:`CryptnoxException` The detected card is not supported by this library .. py:exception:: CertificateException Bases: :py:obj:`CryptnoxException` There was an issue with the certification .. py:exception:: ConnectionException Bases: :py:obj:`CryptnoxException` An issue occurred in the communication with the reader .. py:exception:: DataException Bases: :py:obj:`CryptnoxException` The reader returned an empty message. .. py:exception:: DataValidationException Bases: :py:obj:`CryptnoxException` The sent data is not valid. .. py:exception:: DerivationSelectionException Bases: :py:obj:`CryptnoxException` Not a valid derivation selection. .. py:exception:: EOSKeyError Bases: :py:obj:`CryptnoxException` The signature wasn't compatible with EOS standard after 10 tries .. py:exception:: FirmwareException Bases: :py:obj:`CryptnoxException` There is an issue with the firmware on the card .. py:exception:: GenuineCheckException Bases: :py:obj:`CryptnoxException` The detected card is not a genuine Cryptnox product. .. py:exception:: GenericException(status: bytes) Bases: :py:obj:`CryptnoxException` Generic exception that can mean multiple things depending on the call to the card Process stats and throw a specific Exception from it. .. py:exception:: InitializationException Bases: :py:obj:`CryptnoxException` The card hasn't been initialized. .. py:exception:: KeyAlreadyGenerated Bases: :py:obj:`CryptnoxException` Key can not be generated twice. .. py:exception:: SeedException Bases: :py:obj:`CryptnoxException` Keys weren't found on the card. .. py:exception:: KeyGenerationException Bases: :py:obj:`CryptnoxException` Error in key generation. .. py:exception:: PinAuthenticationException Bases: :py:obj:`CryptnoxException` Error in turning off PIN authentication. There is no user key in the card .. py:exception:: PinException(number_of_retries: int, message: str = 'Wrong pin') Bases: :py:obj:`CryptnoxException` Sent PIN code is not valid. :param int number_of_retries: Number of retries to send the PIN code before the card is locked. :param str message: Optional message .. py:exception:: PukException(number_of_retries: int = 0, message: str = 'Wrong PUK') Bases: :py:obj:`CryptnoxException` Sent PUK code is not valid. :param int number_of_retries: Number of retries to send the PIN code before the card is locked. :param str message: Optional message .. py:exception:: ReadPublicKeyException Bases: :py:obj:`CryptnoxException` Data received during public key reading is not valid. .. py:exception:: ReaderException Bases: :py:obj:`CryptnoxException` Card reader wasn't found attached to the device. .. py:exception:: SecureChannelException Bases: :py:obj:`CryptnoxException` Secure channel couldn't be established. .. py:exception:: SoftLock Bases: :py:obj:`CryptnoxException` The card is soft locked, and requires power cycle before it can be opened .. py:exception:: CardNotBlocked Bases: :py:obj:`CryptnoxException` Trying to unlock unblocked card