Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/conch/client/__pycache__/knownhosts.cpython-39.pyc
Ðазад
a k�h�M � @ sP d Z ddlZddlZddlmZmZmZ ddlm Z ddl mZ ddlm Z ddlmZmZmZ ddlmZ dd lmZmZmZ dd lmZ ddlmZ ddlmZ dd lmZ ddl m!Z! e� Z"dd� Z#dd� Z$G dd� d�Z%e e�G dd� de%��Z&e e�G dd� d��Z'dd� Z(e e�G dd� de%e!��Z)G dd� d�Z*G dd � d �Z+dS )!zE An implementation of the OpenSSH known_hosts database. @since: 8.2 � N)�Error� a2b_base64� b2a_base64)�closing)�sha1)�implementer)�HostKeyChanged�InvalidEntry�UserRejectedKey)�IKnownHostEntry)�BadKeyError�FingerprintFormats�Key)�defer)�Logger)�nativeString)�secureRandom)�FancyEqMixinc C s t | ��� S )z� Encode a binary string as base64 with no trailing newline. @param s: The string to encode. @type s: L{bytes} @return: The base64-encoded string. @rtype: L{bytes} )r �strip)�s� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/conch/client/knownhosts.py� _b64encode s r c C sz | � dd�}t|�dkrt� �|\}}}|� dd�}t|�dkrT|\}}|�d�}n|d }d}t�t|��}||||fS )a� Extract common elements of base64 keys from an entry in a hosts file. @param string: A known hosts file entry (a single line). @type string: L{bytes} @return: a 4-tuple of hostname data (L{bytes}), ssh key type (L{bytes}), key (L{Key}), and comment (L{bytes} or L{None}). The hostname data is simply the beginning of the line up to the first occurrence of whitespace. @rtype: L{tuple} N� � � � r )�split�lenr �rstripr � fromStringr ) �string�elements� hostnames�keyTypeZ keyAndCommentZsplitkeyZ keyString�comment�keyr r r �_extractCommon- s r'