%PDF- %PDF-
Direktori : /lib/python3/dist-packages/jwt/__pycache__/ |
Current File : //lib/python3/dist-packages/jwt/__pycache__/utils.cpython-312.pyc |
� d��d? � �� � d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZm Z deeef defd�Z deeef defd �Zdedefd �Zdedefd�Zdeeef defd �Zdededefd�Zdedefd�Zdedefd�Zdedddefd�Zdedddefd�Zh d�Z ej2 ddj5 e� z dz ej6 � Zdedefd�Zd Z ej2 d!� Z g d"�Z!dedefd#�Z"y# e $ r Y ��w xY w)$� N)�Union)� EllipticCurve)�decode_dss_signature�encode_dss_signature�value�returnc �~ � t | t � r| j d� S t | t � r| S t d� �)Nzutf-8zExpected a string value)� isinstance�str�encode�bytes� TypeError)r s �+/usr/lib/python3/dist-packages/jwt/utils.py�force_bytesr s6 � ��%����|�|�G�$�$� �E�5� !����1�2�2� �inputc �~ � t | � }t |� dz }|dkD r|dd|z z z }t j |� S )N� r � =)r �len�base64�urlsafe_b64decode)r �input_bytes�rems r �base64url_decoder sF � ��e�$�K� �k� �Q� �C� �Q�w��t�q�3�w�'�'���#�#�K�0�0r c �L � t j | � j dd� S )Nr r )r �urlsafe_b64encode�replace)r s r �base64url_encoder $ s � ��#�#�E�*�2�2�4��=�=r �valc �n � | 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&