HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //proc/thread-self/root/lib/python3.6/site-packages/yubico/__pycache__/yubikey.cpython-36.pyc
3

y@�Vr�@svdZddddddgZddlmZdd	lmZmZmZmZm	Z	dd
l
mZmZm
Z
ddlmZddlmZddd�ZdS)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�cCs�ynt||�}|j�j�}d
|ko*dknr<t|||�S|dkrPt|||�S|d
krdt|||�St|||�Stk
r�}zdt|�kr�td��n�WYd	d	}~XnXd	S)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��	�rzNo USB YubiKey foundzNo YubiKey foundN)rrr)rrr)rrr)rrr)	r
ZstatusZykverrr	r
r�strr)�debug�skipZ
hid_deviceZ
yk_versionZinst�r�/usr/lib/python3.6/yubikey.pyr)s

N)Fr)�__doc__�__all__Zyubico_versionrZyubikey_baserrrrrZyubikey_usb_hidr	r
rZyubikey_neo_usb_hidrZyubikey_4_usb_hidr
rrrrr�<module>s