+
    oi                     t    R t ^ RIt^ RIt]P                  ]]3,          tR R ltR R ltR R lt	R R	 lt
R# )
z0Functions that load and write PEM-encoded files.Nc                f    V ^8  d   QhR\         R\        P                  \        \        3,          /# )   
pem_markerreturn)	FlexiTexttypingTuplebytes)formats   "j/Users/tonyclaw/.openclaw/workspace/scripts/youtube-playlists/venv/lib/python3.14/site-packages/rsa/pem.py__annotate__r      s'       v||E5L'A     c                    \        V \        4      '       g   V P                  R4      p RV ,           R,           RV ,           R,           3# )z2
Returns the start and end PEM markers, as bytes.
asciis   -----BEGIN s   -----s	   -----END )
isinstancer	   encode)r   s   &r   _markersr      sG    
 j%((&&w/
 	#h.z!H, r   c          	      r    V ^8  d   QhR\         R\         R\         R\        P                  \         ,          /# )r   contents	pem_startpem_endr   )r	   r   Iterator)r
   s   "r   r   r   &   s8     *C *C *C5 *C5 *CV__UZE[ *Cr   c              #  ~  "   RpRpV P                  4        Fl  pVP                  4       pV'       g   K  WQ8X  d!   V'       d   \        RV,          4      hRpRpKC  V'       g   KM  V'       d   WR8X  d   Rp MRV9   d   Kh  Vx  Kn  	  V'       g   \        RV,          4      hV'       d   \        RV,          4      hR# 5i)z7Generator over PEM lines between pem_start and pem_end.FzSeen start marker "%r" twiceT   :zNo PEM start marker "%r" foundzNo PEM end marker "%r" foundN)
splitlinesstrip
ValueError)r   r   r   in_pem_partseen_pem_startlines   &&&   r   
_pem_linesr    &   s      KN##%zz|   !?)!KLLK!N  4?K 4<
; &@ 9IEFF7'ABB s#   ?B=B="	B=,"B=B=)B=c                <    V ^8  d   QhR\         R\         R\        /# r   r   r   r   )r   r	   )r
   s   "r   r   r   S   s!     * *y *i *E *r   c                    \        V \        4      '       g   V P                  R4      p \        V4      w  r#\	        WV4       Uu. uF  qDNK  	  ppRP                  V4      p\        P                  ! V4      # u upi )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.

r   r   )r   r	   r   r   r    joinbase64standard_b64decode)r   r   r   r   r   	pem_linespems   &&     r   load_pemr)   S   sp      h&&??7+#J/Y",X'"JK"J$"JIK ((9
C$$S))	 Ls   
A6c                <    V ^8  d   QhR\         R\        R\         /# r"   )r	   r   )r
   s   "r   r   r   n   s!     ! !u !) ! !r   c                F   \        V4      w  r#\        P                  ! V 4      P                  RR4      pV.p\	        ^ \        V4      ^@4       F  pWFV^@,            pVP                  V4       K!  	  VP                  V4       VP                  R4       RP                  V4      # )aR  Saves 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.

   
r   )r   r%   standard_b64encodereplacerangelenappendr$   )r   r   r   r   b64r'   block_startblocks   &&      r   save_pemr5   n   s     $J/Y

#
#H
-
5
5eS
ACIQC"-+"23 . WS::i  r   )__doc__r%   r   Unionstrr	   r   r   r    r)   r5    r   r   <module>r:      s:    7   LLe$	*CZ*6!r   