OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
third_party
/
pyu2f
/
pyu2f
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/11/2025 08:19:48 AM
rwxr-xr-x
📄
__init__.cpython-39.pyc
198 bytes
02/11/2025 08:19:48 AM
rw-r--r--
📄
apdu.cpython-39.pyc
3.77 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
errors.cpython-39.pyc
3.16 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
hardware.cpython-39.pyc
5.12 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
hidtransport.cpython-39.pyc
9.66 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
model.cpython-39.pyc
2.44 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
u2f.cpython-39.pyc
5.49 KB
02/11/2025 08:19:48 AM
rw-r--r--
Editing: model.cpython-39.pyc
Close
a ��aT � @ sd d Z ddlZddlZddlmZ G dd� de�ZG dd� de�ZG dd � d e�ZG d d� de�Z dS )z�Implements data model for the library. This module implements basic data model objects that are necessary for interacting with the Security Key as well as for implementing the higher level components of the U2F protocol. � N)�errorsc @ s0 e Zd ZdZdZdZdd� Zdd� Zdd � Zd S )� ClientDatazUFIDO U2F ClientData. Implements the ClientData object of the FIDO U2F protocol. znavigator.id.getAssertionznavigator.id.finishEnrollmentc C s. |t jt jfvrt�� �|| _|| _|| _d S �N)r �TYP_REGISTRATION�TYP_AUTHENTICATIONr �InvalidModelError�typ�raw_server_challenge�origin)�selfr r r � r �,/opt/gsutil/third_party/pyu2f/pyu2f/model.py�__init__$ s zClientData.__init__c C s4 t �| j��� }|�d�}tj| j|| jd�dd�S )z=Returns JSON version of ClientData compatible with FIDO spec.�=)r � challenger T)� sort_keys) �base64�urlsafe_b64encoder �decode�rstrip�json�dumpsr r )r Zserver_challenge_b64r r r �GetJson+ s � ��zClientData.GetJsonc C s | � � S r )r )r r r r �__repr__9 s zClientData.__repr__N) �__name__� __module__�__qualname__�__doc__r r r r r r r r r r s r c @ s e Zd Zddd�ZdS )� RegisteredKey�U2F_V2c C s || _ || _d S r )� key_handle�version)r r r! r r r r ? s zRegisteredKey.__init__N)r �r r r r r r r r r = s r c @ s e Zd Zdd� ZdS )�RegisterResponsec C s || _ || _d S r )�registration_data�client_data)r r$ r% r r r r F s zRegisterResponse.__init__Nr"