HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib/python3.10/site-packages/jose/backends/__pycache__/base.cpython-310.pyc
o

��h��@s2ddlmZmZGdd�d�ZGdd�de�ZdS)�)�base64url_encode�
ensure_binaryc@sdeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	ddd�Z
ddd�Zdd�Zdd�Z
dS)�Keyz7
    A simple interface for implementing JWK keys.
    cCsdS�N�)�self�key�	algorithmrr�H/usr/local/CyberPanel/lib/python3.10/site-packages/jose/backends/base.py�__init__	szKey.__init__cC�t��r��NotImplementedError)r�msgrrr
�sign�zKey.signcCrrr
)rr�sigrrr
�verifyrz
Key.verifycCrrr
�rrrr
�
public_keyrzKey.public_keycCrrr
rrrr
�to_pemrz
Key.to_pemcCrrr
rrrr
�to_dictrzKey.to_dictNcCr)aI
        Encrypt the plain text and generate an auth tag if appropriate

        Args:
            plain_text (bytes): Data to encrypt
            aad (bytes, optional): Authenticated Additional Data if key's algorithm supports auth mode

        Returns:
            (bytes, bytes, bytes): IV, cipher text, and auth tag
        r
)r�
plain_text�aadrrr
�encryptszKey.encryptcCr)ay
        Decrypt the cipher text and validate the auth tag if present
        Args:
            cipher_text (bytes): Cipher text to decrypt
            iv (bytes): IV if block mode
            aad (bytes): Additional Authenticated Data to verify if auth mode
            tag (bytes): Authentication tag if auth mode

        Returns:
            bytes: Decrypted value
        r
)r�cipher_text�ivr�tagrrr
�decrypt(szKey.decryptcCr)z�
        Wrap the the plain text key data

        Args:
            key_data (bytes): Key data to wrap

        Returns:
            bytes: Wrapped key
        r
)r�key_datarrr
�wrap_key6�
zKey.wrap_keycCr)z�
        Unwrap the the wrapped key data

        Args:
            wrapped_key (bytes): Wrapped key data to unwrap

        Returns:
            bytes: Unwrapped key
        r
)r�wrapped_keyrrr
�
unwrap_keyBr!zKey.unwrap_keyr)NNN)�__name__�
__module__�__qualname__�__doc__rrrrrrrrr r#rrrr
rs


rc@seZdZdd�Zdd�ZdS)�DIRKeycCst|�|_||_dSr)r�_key�_alg)rrr	rrr
rPs

zDIRKey.__init__cCs|jdt|j�d�S)N�oct)�alg�kty�k)r*rr)rrrr
rTs�zDIRKey.to_dictN)r$r%r&rrrrrr
r(Osr(N)�utilsrrrr(rrrr
�<module>sK