%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/paramiko/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/paramiko/__pycache__/primes.cpython-312.pyc

�

�ec��T�dZddlZddlmZddlmZmZddlmZd�Z	Gd�de
�Zy)	z,
Utility functions for dealing with primes.
�N)�util)�	byte_mask�long)�SSHExceptionc��tj|dz
�}|dzdz}td|dz�dz
}	tj|�}|dkDrt|d|�|ddz}tj|d�}||kr	|S�N)z returns a random # from 0 to N-1����rN)r�
bit_length�pow�os�urandomr�inflate_long)�n�bits�
byte_count�
hbyte_mask�x�nums      �1/usr/lib/python3/dist-packages/paramiko/primes.py�_roll_randomrs����?�?�1�q�5�!�D���(�q��J��Q��q��!�A�%�J���J�J�z�"����>��!�A�$�
�+�a���e�3�A�����1�%����7���J��c�(�eZdZdZd�Zd�Zd�Zd�Zy)�ModulusPackzx
    convenience object for holding the contents of the /etc/ssh/moduli file,
    on systems that have such a file.
    c� �i|_g|_y)N)�pack�	discarded)�selfs r�__init__zModulusPack.__init__:s����	���rc�N�|j�\}}}}}}}t|�}t|�}t|�}t|�}t|�}t|d�}|dks|dks|dzr(|dkr#|dkr|jj	|df�y|dk(rd}tj|�}	|	|k7r5|	|dzk7r-|jj	|d	j|�f�y|	|jvrg|j|	<|j|	j	||f�y)
N�r�r
�dz does not meet basic requirementsrrz"incorrectly reported bit length {})	�split�intrr�appendrr�formatr)
r�line�	timestamp�mod_type�tests�tries�size�	generator�modulus�bls
          r�_parse_moduluszModulusPack._parse_modulus?s/��
�J�J�L�	
���������x�=���E�
���E�
���4�y���	�N�	��w��#��
�q�L��q�y���	�e�a�i�E�C�K��N�N�!�!��<�=�
�
���>��I�
�_�_�W�
%���$�J�R�4�!�8�^��N�N�!�!��>�E�E�d�K�L�
�
�
�T�Y�Y���D�I�I�b�M��	�	�"�
���i��1�2rc���i|_t|d�5}|D];}|j�}t|�dk(s|ddk(r�*	|j	|��=	ddd�y#Y�LxYw#1swYyxYw)zM
        :raises IOError: passed from any file operations that fail.
        �rr�#N)r�open�strip�lenr2)r�filename�fr)s    r�	read_filezModulusPack.read_filems�����	�
�(�C�
 �	�A��
���z�z�|����I��N��Q��3�����'�'��-�
�	�	�����	�	�s#�-A&�A�A&�A#�!A&�&A/c��t|jj��}t|�dk(rt	d��d}|D]}||k\s�	||ks�||ks|dk(s�|}�|dk(r|D]}||k\s�	||ks�||kDs�|}�|dk(r|d}||kDr|d}tt|j|��}|j||S)Nrzno moduli available���)�sortedr�keysr8rr)r�min�prefer�max�bitsizes�good�brs        r�get_moduluszModulusPack.get_modulus|s����$�)�)�.�.�*�+���x�=�A���4�5�5����	�A��V��!�s�(��T��T�R�Z���	��2�:��
����H�1��8�!�d�(��D�
��2�:�
�A�;�D��T�z���|����T�Y�Y�t�_�-�.���y�y���q�!�!rN)�__name__�
__module__�__qualname__�__doc__r r2r;rF�rrrr4s���
�
,3�\
�"rr)rJr�paramikor�paramiko.py3compatrr�paramiko.ssh_exceptionrr�objectrrKrr�<module>rPs+��&�
��.�/��,`"�&�`"r

Zerion Mini Shell 1.0