D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
lib
/
python3.9
/
site-packages
/
yubico
/
__pycache__
/
Filename :
yubikey.cpython-39.pyc
back
Copy
a �w\r � @ sn d Z g d�ZddlmZ ddlmZmZmZmZm Z ddl mZmZm Z ddlmZ ddlmZ d d d�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� c C s� zvt | |�}|�� �� }d| kr,dkr>n nt| ||�W S |dk rTt| ||�W S |dk rjt| ||�W S t| ||�W S ty� } z$dt|�v r�td��n� W Y d}~n d}~0 0 dS )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 � )r r � )� r r )r r r zNo 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 r N)Fr )�__doc__�__all__Zyubico_versionr Zyubikey_baser r r r r Zyubikey_usb_hidr r r Zyubikey_neo_usb_hidr Zyubikey_4_usb_hidr r r r r r �<module> s