403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.114
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /snap/certbot/current/lib64/python3.12/site-packages/josepy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/certbot/current/lib64/python3.12/site-packages/josepy/__pycache__/b64.cpython-312.pyc
�


N�g���F�dZddlZddlmZdedefd�Zdeeefdefd�Zy)a`JOSE Base64`_ is defined as:

  - URL-safe Base64
  - padding stripped

.. _`JOSE Base64`:
    https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-37#appendix-C

.. Do NOT try to call this module "base64", as it will "shadow" the
   standard library.

�N)�Union�data�returnc��t|t�std��tj|�jd�S)z�JOSE Base64 encode.

    :param data: Data to be encoded.
    :type data: bytes

    :returns: JOSE Base64 string.
    :rtype: bytes

    :raises TypeError: if ``data`` is of incorrect type

    zargument should be bytes�=)�
isinstance�bytes�	TypeError�base64�urlsafe_b64encode�rstrip�rs �z/build/snapcraft-certbot-2c33630aaf29c47357e5a1683f659d3d/parts/certbot/install/lib/python3.12/site-packages/josepy/b64.py�	b64encoders6���d�E�"��2�3�3��#�#�D�)�0�0��6�6�c��t|t�r	|jd�}nt|t
�st
d��tj|ddt|�dzz
zz�S#t$rt	d��wxYw)a^JOSE Base64 decode.

    :param data: Base64 string to be decoded. If it's unicode, then
                 only ASCII characters are allowed.
    :type data: bytes or unicode

    :returns: Decoded data.
    :rtype: bytes

    :raises TypeError: if input is of incorrect type
    :raises ValueError: if input is unicode with non-ASCII characters

    �asciiz5unicode argument should contain only ASCII charactersz#argument should be a str or unicoder�)
r�str�encode�UnicodeEncodeError�
ValueErrorr	r
r�urlsafe_b64decode�lenrs r�	b64decoder#s����$���	V��;�;�w�'�D���e�
$��=�>�>��#�#�D�4�1��D�	�A�
�3F�+G�$G�H�H��"�	V��T�U�U�	V�s�A)�)A>)�__doc__r�typingrr	rrr�rr�<module>rsD�����7�E�7�e�7�"I�E�%��*�%�I�%�Ir

Youez - 2016 - github.com/yon3zu
LinuXploit