File: //lib/python3/dist-packages/rsa/__pycache__/core.cpython-312.pyc
�
%
�a� � �L � d Z dededdfd�Zdedededefd �Zd
edededefd�Zy)
z}Core mathematical operations.
This is the actual core RSA implementation, which is only defined
mathematically on integers.
�var�name�returnNc �X � t | t � ry t |�d| j ��� �)Nz should be an integer, not )�
isinstance�int� TypeError� __class__)r r s �*/usr/lib/python3/dist-packages/rsa/core.py�
assert_intr s# � ��#�s���
��s�}�}�M�
N�N� �message�ekey�nc � � t | d� t |d� t |d� | dk rt d� �| |kD rt d| |fz � �t | ||� S )z@Encrypts a message using encryption key 'ekey', working modulo nr
r r � z'Only non-negative numbers are supportedz#The message %i is too long for n=%i)r �
ValueError�
OverflowError�pow)r
r r s r
�encrypt_intr s` � � �w� �"��t�V���q�#����{��B�C�C���{��A�W�a�L�P�Q�Q��w��a� � r �
cyphertext�dkeyc �h � t | d� t |d� t |d� t | ||� }|S )zHDecrypts a cypher text using the decryption key 'dkey', working modulo nr r r )r r )r r r r
s r
�decrypt_intr - s5 � � �z�<�(��t�V���q�#���*�d�A�&�G��Nr )�__doc__r �strr r r � r r
�<module>r sj ���O�C� O�s� O�t� O�
!��
!�C�
!�C�
!�C�
!� �C� �s� �s� �s� r