ok

Mini Shell

Direktori : /opt/imunify360/venv/lib64/python3.11/site-packages/jwt/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/jwt/__pycache__/utils.cpython-311.pyc

�

f��f�	��<�ddlZddlZddlmZmZ	ddlmZddlmZm	Z	n
#e
$reZYnwxYwdeeefdefd�Z
deeefdefd	�Zdedefd
�Zdedefd�Zdeeefdefd
�Zdededefd�Zdedefd�Zdedefd�Zdededefd�Zdededefd�ZdS)�N)�Any�Union)�
EllipticCurve)�decode_dss_signature�encode_dss_signature�value�returnc��t|t��r|�d��St|t��r|St	d���)Nzutf-8zExpected a string value)�
isinstance�str�encode�bytes�	TypeError)rs �i/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/jwt/utils.py�force_bytesrsL���%����3��|�|�G�$�$�$�	�E�5�	!�	!�3����1�2�2�2��inputc���t|t��r|�d��}t|��dz}|dkr|dd|z
zz
}t	j|��S)N�ascii�r�=)rrr
�len�base64�urlsafe_b64decode)r�rems  r�base64url_decodersa���%����&����W�%�%��

�e�*�*�q�.�C�
�Q�w�w�
���S��!�!���#�E�*�*�*rc�R�tj|���dd��S)Nrr)r�urlsafe_b64encode�replace)rs r�base64url_encoder $s#���#�E�*�*�2�2�4��=�=�=r�valc��|dkrtd���t|��}t|��dkrd}t|��S)NrzMust be a positive integer�)�
ValueError�bytes_from_intrr )r!�	int_bytess  r�to_base64url_uintr'(sK��
�Q�w�w��5�6�6�6��s�#�#�I�
�9�~�~�����	��I�&�&�&rc��t|t��r|�d��}t|��}t�|d���S)Nr�big)�	byteorder)rrr
r�int�
from_bytes)r!�datas  r�from_base64url_uintr.4sH���#�s���"��j�j��!�!���C� � �D��>�>�$�%�>�0�0�0r�num�	num_bytesc�h�dd|z|fz}tj|�d����}|S)Nz%0*x�r)�binascii�a2b_hexr
)r/r0�
padded_hex�
big_endians    r�number_to_bytesr7<s9���1�y�=�#�.�.�J��!�*�"3�"3�G�"<�"<�=�=�J��r�stringc�F�ttj|��d��S)N�)r+r3�b2a_hex)r8s r�bytes_to_numberr<Bs���x���'�'��,�,�,rc�f�|}d}|dkr|dz	}|dz
}|dk�|�|dd���S)Nr��r)F)�signed)�to_bytes)r!�	remaining�byte_lengths   rr%r%FsM���I��K�
�q�.�.���N�	��q����q�.�.��<�<��U�5�<�9�9�9r�der_sig�curvec��|j}|dzdz}t|��\}}t||��t||��zS)N�r>)�key_sizerr7)rDrE�num_bitsr0�r�ss      r�der_to_raw_signaturerLQsG���~�H��A��!�#�I���(�(�D�A�q��1�i�(�(�?�1�i�+H�+H�H�Hr�raw_sigc���|j}|dzdz}t|��d|zkrtd���t|d|���}t||d���}t	||��S)NrGr>r2zInvalid signature)rHrr$r<r)rMrErIr0rJrKs      r�raw_to_der_signaturerOZsw���~�H��A��!�#�I�
�7�|�|�q�9�}�$�$��,�-�-�-���
��
�+�,�,�A���	�
�
�+�,�,�A���1�%�%�%r)rr3�typingrr�,cryptography.hazmat.primitives.asymmetric.ecr�/cryptography.hazmat.primitives.asymmetric.utilsrr�ModuleNotFoundErrorrrrrr r+r'r.r7r<r%rLrO�rr�<module>rUs.��
�
�
�
��������������J�J�J�J�J�J����������������M�M�M�����3�u�S�%�Z�(�3�U�3�3�3�3�	+�E�#�u�*�-�	+�%�	+�	+�	+�	+�>�E�>�e�>�>�>�>�	'�3�	'�5�	'�	'�	'�	'�1�U�3��:�.�1�3�1�1�1�1�����������-�E�-�c�-�-�-�-�:��:��:�:�:�:�I�%�I�
�I�%�I�I�I�I�
&�%�
&�
�
&�%�
&�
&�
&�
&�
&�
&s�!�+�+

Zerion Mini Shell 1.0