| Server IP : 167.99.254.82 / Your IP : 216.73.216.76 Web Server : Apache System : Linux host.techisquad.com 5.15.0-187-generic #197-Ubuntu SMP Fri Jul 17 19:17:01 UTC 2026 x86_64 User : pawluxera ( 1011) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/rsa/__pycache__/ |
Upload File : |
o
j��`} � @ sR d Z dededdfdd�Zdeded edefd
d�Zded
ed edefdd�ZdS )z}Core mathematical operations.
This is the actual core RSA implementation, which is only defined
mathematically on integers.
�var�name�returnNc C s t | t�rd S td|| jf ��)Nz%s should be an integer, not %s)�
isinstance�int� TypeError� __class__)r r � r �*/usr/lib/python3/dist-packages/rsa/core.py�
assert_int s
r
�message�ekey�nc C sR t | d� t |d� t |d� | dk rtd��| |kr#td| |f ��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
r r r �encrypt_int s
r �
cyphertext�dkeyc C s. 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 r r r �decrypt_int- s
r )�__doc__r �strr
r r r r r r �<module> s