Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
josepy /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxrwxrwx
2020-08-25 15:28
__init__.py
1.97
KB
-rwxrwxrwx
2018-04-13 16:47
b64.py
1.47
KB
-rwxrwxrwx
2018-04-13 16:47
b64_test.py
2.27
KB
-rwxrwxrwx
2018-04-13 16:47
errors.py
815
B
-rwxrwxrwx
2018-04-13 16:47
errors_test.py
463
B
-rwxrwxrwx
2018-04-13 16:47
interfaces.py
7.56
KB
-rwxrwxrwx
2018-04-13 16:47
interfaces_test.py
3.54
KB
-rwxrwxrwx
2018-04-13 16:47
json_util.py
15.38
KB
-rwxrwxrwx
2018-04-13 16:47
json_util_test.py
13.94
KB
-rwxrwxrwx
2018-04-13 16:47
jwa.py
6.01
KB
-rwxrwxrwx
2018-04-13 16:47
jwa_test.py
4.54
KB
-rwxrwxrwx
2018-04-13 16:47
jwk.py
9.19
KB
-rwxrwxrwx
2018-04-13 16:47
jwk_test.py
6.92
KB
-rwxrwxrwx
2018-04-13 16:47
jws.py
13.93
KB
-rwxrwxrwx
2018-04-13 16:47
jws_test.py
8.32
KB
-rwxrwxrwx
2018-04-13 16:47
test_util.py
2.85
KB
-rwxrwxrwx
2018-04-13 16:47
util.py
7.3
KB
-rwxrwxrwx
2018-04-13 16:47
util_test.py
6.45
KB
-rwxrwxrwx
2018-04-13 16:47
Save
Rename
"""`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. """ import base64 import six def b64encode(data): """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 """ if not isinstance(data, six.binary_type): raise TypeError('argument should be {0}'.format(six.binary_type)) return base64.urlsafe_b64encode(data).rstrip(b'=') def b64decode(data): """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 """ if isinstance(data, six.string_types): try: data = data.encode('ascii') except UnicodeEncodeError: raise ValueError( 'unicode argument should contain only ASCII characters') elif not isinstance(data, six.binary_type): raise TypeError('argument should be a str or unicode') return base64.urlsafe_b64decode(data + b'=' * (4 - (len(data) % 4)))