OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
gslib
/
vendored
/
oauth2client
/
oauth2client
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/11/2025 08:19:48 AM
rwxr-xr-x
📄
__init__.cpython-39.pyc
585 bytes
02/11/2025 08:19:48 AM
rw-r--r--
📄
_helpers.cpython-39.pyc
9.94 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
_openssl_crypt.cpython-39.pyc
4.16 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
_pkce.cpython-39.pyc
1.68 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
_pure_python_crypt.cpython-39.pyc
5.97 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
_pycrypto_crypt.cpython-39.pyc
3.91 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
client.cpython-39.pyc
66.44 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
clientsecrets.cpython-39.pyc
4.07 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
crypt.cpython-39.pyc
6.15 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
service_account.cpython-39.pyc
21.45 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
tools.cpython-39.pyc
7.86 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
transport.cpython-39.pyc
7.8 KB
02/11/2025 08:19:48 AM
rw-r--r--
Editing: _pkce.cpython-39.pyc
Close
a ��a� � @ s2 d Z ddlZddlZddlZddd�Zdd� ZdS ) zm Utility functions for implementing Proof Key for Code Exchange (PKCE) by OAuth Public Clients See RFC7636. � N�@ c C sJ t �t�| ���d�}t|�dk r,td��nt|�dkrBtd��n|S dS )a� Generates a 'code_verifier' as described in section 4.1 of RFC 7636. This is a 'high-entropy cryptographic random string' that will be impractical for an attacker to guess. Args: n_bytes: integer between 31 and 96, inclusive. default: 64 number of bytes of entropy to include in verifier. Returns: Bytestring, representing urlsafe base64-encoded random data. � =�+ z)Verifier too short. n_bytes must be > 30.� z(Verifier too long. n_bytes must be < 97.N)�base64�urlsafe_b64encode�os�urandom�rstrip�len� ValueError)Zn_bytes�verifier� r �=/opt/gsutil/gslib/vendored/oauth2client/oauth2client/_pkce.py� code_verifier s r c C s t �| ��� }t�|��d�S )a� Creates a 'code_challenge' as described in section 4.2 of RFC 7636 by taking the sha256 hash of the verifier and then urlsafe base64-encoding it. Args: verifier: bytestring, representing a code_verifier as generated by code_verifier(). Returns: Bytestring, representing a urlsafe base64-encoded sha256 hash digest, without '=' padding. r )�hashlib�sha256�digestr r r )r r r r r �code_challenge4 s r )r )�__doc__r r r r r r r r r �<module> s