403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.117.216.191
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib64/python3.7/site-packages/Crypto/PublicKey/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib64/python3.7/site-packages/Crypto/PublicKey/__pycache__/pubkey.cpython-37.pyc
B

t~�^��@s.dZddlZddlZddlTGdd�d�ZdS)z$Id$�N)�*c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&S)'�pubkeyzxAn abstract class for a public key object.

    :undocumented: __getstate__, __setstate__, __eq__, __ne__, validate
    cCsdS)N�)�selfrr�J/opt/alt/python37/lib64/python3.7/site-packages/Crypto/PublicKey/pubkey.py�__init__&szpubkey.__init__cCs2|j}x&|jD]}||krt||�||<qW|S)z�To keep key objects platform-independent, the key data is
        converted to standard Python long integers before being
        written out.  It will then be reconverted as necessary on
        restoration.)�__dict__�keydata�int)r�d�keyrrr�__getstate__)s
zpubkey.__getstate__cCs.x(|jD]}||krt||�|j|<qWdS)z�On unpickling a key object, the key data is converted to the big
number representation being used, whether that is Python long
integers, MPZ objects, or whatever.N)r	Zbignumr)rrrrrr�__setstate__3szpubkey.__setstate__cCsRd}t|t�rt|�}d}t|t�r,t|�}|�||�}|rJttt|��S|SdS)ajEncrypt a piece of data.

        :Parameter plaintext: The piece of data to encrypt.
        :Type plaintext: byte string or long

        :Parameter K: A random parameter required by some algorithms
        :Type K: byte string or long

        :Return: A tuple with two items. Each item is of the same type as the
         plaintext (string or long).
        r�N)�
isinstance�bytes�
bytes_to_longZ_encrypt�tuple�map�
long_to_bytes)r�	plaintext�K�	wasString�
ciphertextrrr�encrypt:s

zpubkey.encryptcCsRd}t|t�s|f}t|dt�r4ttt|��}d}|�|�}|rJt|�S|SdS)a.Decrypt a piece of data. 

        :Parameter ciphertext: The piece of data to decrypt.
        :Type ciphertext: byte string, long or a 2-item tuple as returned by `encrypt`

        :Return: A byte string if ciphertext was a byte string or a tuple
         of byte strings. A long otherwise.
        rrN)rrrrrZ_decryptr)rrrrrrr�decryptOs	

zpubkey.decryptcCs@|��std��t|t�r"t|�}t|t�r4t|�}|�||�S)a
Sign a piece of data.

        :Parameter M: The piece of data to encrypt.
        :Type M: byte string or long

        :Parameter K: A random parameter required by some algorithms
        :Type K: byte string or long

        :Return: A tuple with two items.
        z(Private key not available in this object)�has_private�	TypeErrorrrrZ_sign)r�Mrrrr�signas

zpubkey.signcCst|t�rt|�}|�||�S)a>Verify the validity of a signature.

        :Parameter M: The expected message.
        :Type M: byte string or long

        :Parameter signature: The signature to verify.
        :Type signature: tuple with two items, as return by `sign`

        :Return: True if the signature is correct, False otherwise.
        )rrrZ_verify)rr�	signaturerrr�verifyrs
z
pubkey.verifycCst�dt�dS)Nz0validate() method name is obsolete; use verify())�warnings�warn�DeprecationWarning)rrr rrr�validate�szpubkey.validatecCsLd}t|t�rt|�}d}t|t�r,t|�}|�||�}|rDt|�S|SdS)a&Blind a message to prevent certain side-channel attacks.
       
        :Parameter M: The message to blind.
        :Type M: byte string or long

        :Parameter B: Blinding factor.
        :Type B: byte string or long

        :Return: A byte string if M was so. A long otherwise.
        rrN)rrrZ_blindr)rr�BrZblindedmessagerrr�blind�s

zpubkey.blindcCsLd}t|t�rt|�}d}t|t�r,t|�}|�||�}|rDt|�S|SdS)z�Unblind a message after cryptographic processing.
        
        :Parameter M: The encoded message to unblind.
        :Type M: byte string or long

        :Parameter B: Blinding factor.
        :Type B: byte string or long
        rrN)rrrZ_unblindr)rrr&rZunblindedmessagerrr�unblind�s	

zpubkey.unblindcCsdS)a(Tell if the algorithm can deal with cryptographic signatures.

        This property concerns the *algorithm*, not the key itself.
        It may happen that this particular key object hasn't got
        the private information required to generate a signature.

        :Return: boolean
        rr)rrrr�can_sign�s	zpubkey.can_signcCsdS)aTell if the algorithm can deal with data encryption.
       
        This property concerns the *algorithm*, not the key itself.
        It may happen that this particular key object hasn't got
        the private information required to decrypt data.

        :Return: boolean
        rr)rrrr�can_encrypt�s	zpubkey.can_encryptcCsdS)aTell if the algorithm can deal with data blinding.
       
        This property concerns the *algorithm*, not the key itself.
        It may happen that this particular key object hasn't got
        the private information required carry out blinding.

        :Return: boolean
        rr)rrrr�	can_blind�s	zpubkey.can_blindcCsdS)z_Tell the maximum number of bits that can be handled by this key.

        :Return: int
        rr)rrrr�size�szpubkey.sizecCsdS)zSTell if the key object contains private components.

        :Return: bool
        rr)rrrrr�szpubkey.has_privatecCs|S)zkConstruct a new key carrying only the public information.

        :Return: A new `pubkey` object.
        r)rrrr�	publickey�szpubkey.publickeycCs|��|��kS)zF__eq__(other): 0, 1
        Compare us to other for equality.
        )r
)r�otherrrr�__eq__�sz
pubkey.__eq__cCs|�|�S)zH__ne__(other): 0, 1
        Compare us to other for inequality.
        )r/)rr.rrr�__ne__�sz
pubkey.__ne__N)�__name__�
__module__�__qualname__�__doc__rr
rrrrr!r%r'r(r)r*r+r,rr-r/r0rrrrr!s&
r)�__revision__�typesr"ZCrypto.Util.numberrrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit