HEX
Server: LiteSpeed
System: Linux shams.tasjeel.ae 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: infowars (1469)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/yubico/__pycache__/yubikey.cpython-39.opt-1.pyc
a

�w\r�@sndZgd�ZddlmZddlmZmZmZmZm	Z	ddl
mZmZm
Z
ddlmZddlmZd
d
d�ZdS)a+
module for accessing a YubiKey

In an attempt to support any future versions of the YubiKey which
might not be USB HID devices, you should always use the yubikey.find_key()
(or better yet, yubico.find_yubikey()) function to initialize
communication with YubiKeys.

Example usage (if using this module directly, see base module yubico) :

    import yubico.yubikey

    try:
        YK = yubico.yubikey.find_key()
        print "Version : %s " % YK.version()
    except yubico.yubico_exception.YubicoError as inst:
        print "ERROR: %s" % inst.reason
)ZRESP_TIMEOUT_WAIT_FLAGZRESP_PENDING_FLAGZSLOT_WRITE_FLAG�find_key�YubiKey�YubiKeyTimeout�)�__version__)�YubiKeyErrorr�YubiKeyVersionError�YubiKeyCapabilitiesr)�
YubiKeyUSBHID�YubiKeyHIDDevice�YubiKeyUSBHIDError)�YubiKeyNEO_USBHID)�YubiKey4_USBHIDF�c
Cs�zvt||�}|����}d|kr,dkr>nnt|||�WS|dkrTt|||�WS|dkrjt|||�WSt|||�WSty�}z$dt|�vr�td��n�WYd}~n
d}~00dS)a
    Locate a connected YubiKey. Throws an exception if none is found.

    This function is supposed to be possible to extend if any other YubiKeys
    appear in the future.

    Attributes :
        skip  -- number of YubiKeys to skip
        debug -- True or False
    )�r�)rr�	)�rr)rrrzNo USB YubiKey foundzNo YubiKey foundN)	r
�statusZykverrr	r
r�strr)�debug�skipZ
hid_deviceZ
yk_version�inst�r�2/usr/lib/python3.9/site-packages/yubico/yubikey.pyr)s

rN)Fr)�__doc__�__all__Zyubico_versionrZyubikey_baserrrrrZyubikey_usb_hidr	r
rZyubikey_neo_usb_hidrZyubikey_4_usb_hidr
rrrrr�<module>s