%PDF- %PDF-
Direktori : /lib/python3/dist-packages/paramiko/__pycache__/ |
Current File : //lib/python3/dist-packages/paramiko/__pycache__/ed25519key.cpython-312.pyc |
� �ec � �~ � d dl Z d dlmZ d dlmZ d dlZd dlmZ d dl m Z mZmZ d dl mZ d dlmZmZ G d� d e � Zy) � N)�default_backend)�Cipher)�Message)�PKey�OPENSSH_AUTH_MAGIC�_unpad_openssh)�b)�SSHException�PasswordRequiredExceptionc �V � e Zd ZdZ dd�Zd� Zd� Zed� � Zd� Z d� Z d � Zd d �Zd� Z y)� Ed25519Keya Representation of an `Ed25519 <https://ed25519.cr.yp.to/>`_ key. .. note:: Ed25519 key support was added to OpenSSH in version 6.5. .. versionadded:: 2.2 .. versionchanged:: 2.3 Added a ``file_obj`` parameter to match other key classes. Nc �� � d | _ d x}}|� |�t |� }|�B| j |dd�� t j j |j � � }nD|�+t |d� 5 }| j d|� \ } }d d d � n|�| j d|� \ } }|s|r| j ||� }|� |�t d� �|| _ || _ y # 1 sw Y �=xY w)N�ssh-ed25519z ssh-ed25519-cert-v01@openssh.com)�msg�key_type� cert_type�r�OPENSSHz need a key) �public_blobr �_check_type_and_load_cert�nacl�signing� VerifyKey� get_binary�open�_read_private_key�_parse_signing_key_data� ValueError�_signing_key�_verifying_key) �selfr �data�filename�password�file_obj� verifying_key�signing_key�f�pkformats �5/usr/lib/python3/dist-packages/paramiko/ed25519key.py�__init__zEd25519Key.__init__* s � � ���&*�*� ���;�4�+��$�-�C��?��*�*��&�<� +� � !�L�L�2�2�3�>�>�3C�D�M� � !��h��$� F��!%�!7�!7� �1�!E���$� F� F� � !�!�3�3�I�x�H�N�H�d��x��6�6�t�X�F�K���=�#8��\�*�*�'���+��� F� F�s �-C�C c � � ddl m} t |� }|j t t � � t k7 rt d� �|j � }|j � }|j � }|j � }|dk( r|s|dk7 rTt d� �|dk( r9|st d� �t |� } | j � } | j � }nt d� �|dk7 r||j vrt d� �g }t |� D ]X } t |j � � }|j � dk7 rt d� �|j |j � � �Z |j � }|dk( r|}n�|j | }t j t! |� |d |d z d �� }t# |d |d |d � |d ||d d � t% � �� j'