403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/Cryptodome/Cipher/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/Cryptodome/Cipher/__pycache__/_mode_ecb.cpython-311.pyc
�

8�tc� ��r�dZdgZddlmZmZmZmZmZmZm	Z	m
Z
edd��ZGd�de��Z
d�ZdS)	z"
Electronic Code Book (ECB) mode.
�EcbMode�)�load_pycryptodome_raw_lib�VoidPointer�create_string_buffer�get_raw_buffer�SmartPointer�c_size_t�c_uint8_ptr�is_writeable_bufferzCryptodome.Cipher._raw_ecbak
                    int ECB_start_operation(void *cipher,
                                            void **pResult);
                    int ECB_encrypt(void *ecbState,
                                    const uint8_t *in,
                                    uint8_t *out,
                                    size_t data_len);
                    int ECB_decrypt(void *ecbState,
                                    const uint8_t *in,
                                    uint8_t *out,
                                    size_t data_len);
                    int ECB_stop_operation(void *state);
                    c�(�eZdZdZd�Zdd�Zdd�ZdS)ra�*Electronic Code Book (ECB)*.

    This is the simplest encryption mode. Each of the plaintext blocks
    is directly encrypted into a ciphertext block, independently of
    any other block.

    This mode is dangerous because it exposes frequency of symbols
    in your plaintext. Other modes (e.g. *CBC*) should be used instead.

    See `NIST SP800-38A`_ , Section 6.1.

    .. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf

    :undocumented: __init__
    c��|j|_t��|_t�|���|j�����}|rtd|z���t|j���tj	��|_|�
��dS)z�Create a new block cipher, configured in ECB mode.

        :Parameters:
          block_cipher : C pointer
            A smart pointer to the low-level block cipher instance.
        z)Error %d while instantiating the ECB modeN)�
block_sizer�_state�raw_ecb_lib�ECB_start_operation�get�
address_of�
ValueErrorr�ECB_stop_operation�release)�self�block_cipher�results   �=/usr/lib/python3/dist-packages/Cryptodome/Cipher/_mode_ecb.py�__init__zEcbMode.__init__Ds���'�1���!�m�m����0�0��1A�1A�1C�1C�15��1G�1G�1I�1I�K�K���	'��H�%�&�'�'�
'�#�4�;�?�?�#4�#4�#.�#A�C�C���
	��������Nc
�F�|�tt|����}n_|}t|��std���t|��t|��krt	dt|��z���t
�|j���t|��t|��tt|������}|r'|dkrt	d���t	d|z���|�t|��SdS)abEncrypt data with the key set at initialization.

        The data to encrypt can be broken up in two or
        more pieces and `encrypt` can be called multiple times.

        That is, the statement:

            >>> c.encrypt(a) + c.encrypt(b)

        is equivalent to:

             >>> c.encrypt(a+b)

        This function does not add any padding to the plaintext.

        :Parameters:
          plaintext : bytes/bytearray/memoryview
            The piece of data to encrypt.
            The length must be multiple of the cipher block length.
        :Keywords:
          output : bytearray/memoryview
            The location where the ciphertext must be written to.
            If ``None``, the ciphertext is returned.
        :Return:
          If ``output`` is ``None``, the ciphertext is returned as ``bytes``.
          Otherwise, ``None``.
        N�4output must be a bytearray or a writeable memoryview�9output must have the same length as the input  (%d bytes)��2Data must be aligned to block boundary in ECB modez%Error %d while encrypting in ECB mode)r�lenr�	TypeErrorrr�ECB_encryptrrr
r	r)r�	plaintext�output�
ciphertextrs     r�encryptzEcbMode.encrypt^s ��:�>�-�c�)�n�n�=�=�J�J��J�&�v�.�.�
X�� V�W�W�W��9�~�~��V���,�,� �"0�25�i�.�.�"A�B�B�B��(�(�����):�):�)4�Y�)?�)?�)4�Z�)@�)@�)1�#�i�.�.�)A�)A�C�C���	O���{�{� �!U�V�V�V��D�v�M�N�N�N��>�!�*�-�-�-��4rc
�F�|�tt|����}n_|}t|��std���t|��t|��krt	dt|��z���t
�|j���t|��t|��tt|������}|r'|dkrt	d���t	d|z���|�t|��SdS)aeDecrypt data with the key set at initialization.

        The data to decrypt can be broken up in two or
        more pieces and `decrypt` can be called multiple times.

        That is, the statement:

            >>> c.decrypt(a) + c.decrypt(b)

        is equivalent to:

             >>> c.decrypt(a+b)

        This function does not remove any padding from the plaintext.

        :Parameters:
          ciphertext : bytes/bytearray/memoryview
            The piece of data to decrypt.
            The length must be multiple of the cipher block length.
        :Keywords:
          output : bytearray/memoryview
            The location where the plaintext must be written to.
            If ``None``, the plaintext is returned.
        :Return:
          If ``output`` is ``None``, the plaintext is returned as ``bytes``.
          Otherwise, ``None``.
        Nrrr r!z%Error %d while decrypting in ECB mode)rr"rr#rr�ECB_decryptrrr
r	r)rr'r&r%rs     r�decryptzEcbMode.decrypt�s ��:�>�,�S��_�_�=�=�I�I��I�&�v�.�.�
X�� V�W�W�W��:���#�f�+�+�-�-� �"0�25�i�.�.�"A�B�B�B��(�(�����):�):�)4�Z�)@�)@�)4�Y�)?�)?�)1�#�j�/�/�)B�)B�D�D���	O���{�{� �!U�V�V�V��D�v�M�N�N�N��>�!�)�,�,�,��4r)N)�__name__�
__module__�__qualname__�__doc__rr(r+�rrrr3sV�������� ���45�5�5�5�n5�5�5�5�5�5rc��|�|��}|j|_|rtdt|��z���t	|��S)aQInstantiate a cipher object that performs ECB encryption/decryption.

    :Parameters:
      factory : module
        The underlying block cipher, a module from ``Cryptodome.Cipher``.

    All keywords are passed to the underlying block cipher.
    See the relevant documentation for details (at least ``key`` will need
    to be presentzUnknown parameters for ECB: %s)�_create_base_cipherrr#�strr)�factory�kwargs�cipher_states   r�_create_ecb_cipherr7�sS���.�.�v�6�6�L�%�0�L��
�H��8�3�v�;�;�F�G�G�G��<� � � rN)r/�__all__�Cryptodome.Util._raw_apirrrrrr	r
rr�objectrr7r0rr�<module>r;s���.��
�-��7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�(�'�(D�G�
*�
*�� W�W�W�W�W�f�W�W�W�t!�!�!�!�!r

Youez - 2016 - github.com/yon3zu
LinuXploit