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: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib64/python3.10/site-packages/jose/backends/__pycache__/_asn1.cpython-310.pyc
o

�h`
�@s�dZddlmZmZddlmZmZdZGdd�dej�Z	Gdd�dej�Z
Gd	d
�d
ej�Zdd�Zd
d�Z
dd�Zdd�ZdS)zuASN1 encoding helpers for converting between PKCS1 and PKCS8.

Required by rsa_backend but not cryptography_backend.
�)�decoder�encoder)�	namedtype�univz1.2.840.113549.1.1.1c@s4eZdZdZe�e�de���e�de�	���Z
dS)�RsaAlgorithmIdentifierzAASN1 structure for recording RSA PrivateKeyAlgorithm identifiers.�
rsaEncryption�
parametersN)�__name__�
__module__�__qualname__�__doc__r�
NamedTypes�	NamedTyper�ObjectIdentifier�Null�
componentType�rr�F/usr/local/CyberCP/lib/python3.10/site-packages/jose/backends/_asn1.pyrs
�rc	@s@eZdZdZe�e�de���e�de	��e�de�
���ZdS)�PKCS8PrivateKeyz0ASN1 structure for recording PKCS8 private keys.�version�privateKeyAlgorithm�
privateKeyN)r	r
rrrr
rr�Integerr�OctetStringrrrrrrs�rc@s2eZdZdZe�e�de��e�de�	���Z
dS)�
PublicKeyInfoz/ASN1 structure for recording PKCS8 public keys.�	algorithm�	publicKeyN)r	r
rrrr
rrr�	BitStringrrrrrrs
�rcCs:tj|t�d�}z	|d}W|dStytd��w)�1Convert a PKCS8-encoded RSA private key to PKCS1.��asn1SpecrzInvalid private key encodingr)r�decoder�
IndexError�
ValueError��	pkcs8_key�decoded_values�decoded_keyrrr�rsa_private_key_pkcs8_to_pkcs1&s
��r(cCs6t�}t|d<t�}d|d<||d<||d<t�|�S)�1Convert a PKCS1-encoded RSA private key to PKCS8.rrrrr)r�RSA_ENCRYPTION_ASN1_OIDrr�encode��	pkcs1_keyrr%rrr�rsa_private_key_pkcs1_to_pkcs82s
r.cCs6t�}t|d<t�}||d<tj�|�|d<t�|�S)r)rrr)rr*rrr�fromOctetStringrr+r,rrr�rsa_public_key_pkcs1_to_pkcs8?s
r0cCs@tj|t�d�}z|d}Wntytd��w|d��S)rrrzInvalid public key encoding.r)rr!rr"r#�asOctetsr$rrr�rsa_public_key_pkcs8_to_pkcs1Ks�r2N)r�pyasn1.codec.derrr�pyasn1.typerrr*�Sequencerrrr(r.r0r2rrrr�<module>s