ok
Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/jwt/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/jwt/__pycache__/utils.cpython-311.pyc |
� �܋f? � �� � d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZm Z n# e $ r Y nw xY wdeeef defd�Z deeef defd �Zdedefd �Zdedefd�Zdeeef defd �Zdededefd�Zdedefd�Zdedefd�Zdedddefd�Zdedddefd�Zh d�Z ej dd� e� � z dz ej � � Zdedefd�Zd Z ej d!� � Z g d"�Z!dedefd#�Z"dS )$� N)�Union)� EllipticCurve)�decode_dss_signature�encode_dss_signature�value�returnc � � t | t � � r| � d� � S t | t � � r| S t d� � �)Nzutf-8zExpected a string value)� isinstance�str�encode�bytes� TypeError)r s �@/opt/cloudlinux/venv/lib64/python3.11/site-packages/jwt/utils.py�force_bytesr sL � ��%���� 3��|�|�G�$�$�$� �E�5� !� !� 3����1�2�2�2� �inputc � � t | � � }t |� � dz }|dk r|dd|z z z }t j |� � S )N� r � =)r �len�base64�urlsafe_b64decode)r �input_bytes�rems r �base64url_decoder sN � ��e�$�$�K� �k� � �Q� �C� �Q�w�w��t�q�3�w�'�'���#�K�0�0�0r c �R � t j | � � � dd� � S )Nr r )r �urlsafe_b64encode�replace)r s r �base64url_encoder $ s# � ��#�E�*�*�2�2�4��=�=�=r �valc � � | dk rt d� � �t | � � }t |� � dk rd}t |� � S )Nr zMust be a positive integer� )� ValueError�bytes_from_intr r )r � int_bytess r �to_base64url_uintr&