%PDF- %PDF-
| Direktori : /usr/lib/python3/dist-packages/paramiko/__pycache__/ |
| Current File : //usr/lib/python3/dist-packages/paramiko/__pycache__/primes.cpython-312.pyc |
�
�ec � �T � d Z ddlZddlmZ ddlmZmZ ddlmZ d� Z G d� de
� Zy) z,
Utility functions for dealing with primes.
� N)�util)� byte_mask�long)�SSHExceptionc � � t j | dz
� }|dz dz }t d|dz � dz
} t j |� }|dkD rt |d |� |dd z }t j |d� }|| k r |S �N)z returns a random # from 0 to N-1� � � � r N)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_randomr s� � ��?�?�1�q�5�!�D���(�q��J��Q��q��!�A�%�J� ��J�J�z�"����>��!�A�$�
�+�a���e�3�A�����1�%����7���J� � c �( � e Zd ZdZd� 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 � ��� ���r c �N � |j � \ }}}}}}}t |� }t |� }t |� }t |� }t |� }t |d� }|dk s|dk s|dz r(|dk r#|dk r| j j |df� y |dk( rd}t j |� } | |k7 r5| |dz k7 r-| j j |d j |� f� y | | j vrg | j | <