HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib64/python3.10/site-packages/rsa/__pycache__/core.cpython-310.pyc
o

�h}�@sRdZdededdfdd�Zdeded	edefd
d�Zded
ed	edefdd�ZdS)z}Core mathematical operations.

This is the actual core RSA implementation, which is only defined
mathematically on integers.
�var�name�returnNcCs t|t�rdStd||jf��)Nz%s should be an integer, not %s)�
isinstance�int�	TypeError�	__class__)rr�r�;/usr/local/CyberCP/lib/python3.10/site-packages/rsa/core.py�
assert_ints
r
�message�ekey�ncCsRt|d�t|d�t|d�|dkrtd��||kr#td||f��t|||�S)z@Encrypts a message using encryption key 'ekey', working modulo nrrr
�z'Only non-negative numbers are supportedz#The message %i is too long for n=%i)r
�
ValueError�
OverflowError�pow)rrr
rrr	�encrypt_ints


r�
cyphertext�dkeycCs.t|d�t|d�t|d�t|||�}|S)zHDecrypts a cypher text using the decryption key 'dkey', working modulo nrrr
)r
r)rrr
rrrr	�decrypt_int-s



r)�__doc__r�strr
rrrrrr	�<module>s