ok

Mini Shell

Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Util/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Util/__pycache__/Padding.cpython-311.pyc

�

f��f���&�ddgZddlTdd�Zdd�ZdS)	�pad�unpad�)�*�pkcs7c�6�|t|��|zz
}|dkrt|��|z}ng|dkr&td��|dz
zt|��z}n;|dkr&td��td��|dz
zz}ntd���||zS)a�Apply standard padding.

    Args:
      data_to_pad (byte string):
        The data that needs to be padded.
      block_size (integer):
        The block boundary to use for padding. The output length is guaranteed
        to be a multiple of :data:`block_size`.
      style (string):
        Padding algorithm. It can be *'pkcs7'* (default), *'iso7816'* or *'x923'*.

    Return:
      byte string : the original data with the appropriate padding added at the end.
    r�x923r��iso7816��Unknown padding style)�len�bchr�
ValueError)�data_to_pad�
block_size�style�padding_len�paddings     �u/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Util/Padding.pyrr's��� �S��-�-�j�8�8�K������{�#�#�K�/���	�&����q�'�'�;�q�=�)�D��,=�,=�=���	�)�	�	��s�)�)�d�1�g�g�{�1�}�5�5����0�1�1�1��� � �c��t|��}|dkrtd���||zrtd���|dvr�t|d��}|dks|t||��krtd���|dkr/||d	�t	|��|zkrtd
���n�||d�t	d��|dz
zkrtd���n�|dkr�||�t	d
����z
}|dks|t||��krtd���|dkr3|d|z
d	�t	d��|dz
zkrtd���ntd���|d	|�S)a�Remove standard padding.

    Args:
      padded_data (byte string):
        A piece of data with padding that needs to be stripped.
      block_size (integer):
        The block boundary to use for padding. The input length
        must be a multiple of :data:`block_size`.
      style (string):
        Padding algorithm. It can be *'pkcs7'* (default), *'iso7816'* or *'x923'*.
    Return:
        byte string : data without padding.
    Raises:
      ValueError: if the padding is incorrect.
    rz$Zero-length input cannot be unpaddedzInput data is not padded)rr���r	zPadding is incorrect.rNzPKCS#7 padding is incorrect.z ANSI X.923 padding is incorrect.r
rz ISO 7816-4 padding is incorrect.r)r
r�bord�minr�rfind)�padded_datarr�	pdata_lenrs     rrrCs���"�K� � �I��A�~�~��?�@�@�@��:��5��3�4�4�4��!�!�!��;�r�?�+�+���q�=�=�K��J�	�(B�(B�B�B��4�5�5�5��G����K�<�=�=�)�4��+<�+<�[�+H�H�H� �!?�@�@�@�I��K�<��?�+�T�!�W�W�k�!�m�-D�D�D� �!C�D�D�D�E�	�)�	�	��+�"3�"3�D��I�I�">�">�>���q�=�=�K��J�	�(B�(B�B�B��4�5�5�5��q�=�=�[��;����8�$�q�'�'�;�q�=�:Q�Q�Q��?�@�@�@���0�1�1�1��}���}�%�%rN)r)�__all__�Crypto.Util.py3compatrr�rr�<module>r!sP��D
�7�
��#�#�#�#�!�!�!�!�8(&�(&�(&�(&�(&�(&r

Zerion Mini Shell 1.0