+
    ^eòjá   ã                   óp   € ^ RI 5 ^ RIHtHtHtHt ^ RIHtHtH	t	H
t
 RR.tRRR]! 4       R3R ltR	R ltR# )
é    )Ú*)ÚDerNullÚDerSequenceÚDerObjectIdÚDerOctetString)ÚPBES1ÚPBES2Ú	PbesErrorÚ_DEFAULT_MAX_ITERATION_COUNTÚwrapÚunwrapNc                ó4  € Vf   \        \        V4      .4      pM\        \        V4      V.4      p\        ^ V\        V 4      .4      pVP                  4       p	Vf   V	# V'       g   \	        R4      h\        V4      pVf   Rp\        P                  ! W’W4V4      # )a¶  Wrap a private key into a PKCS#8 blob (clear or encrypted).

Args:

  private_key (bytes):
    The private key encoded in binary form. The actual encoding is
    algorithm specific. In most cases, it is DER.

  key_oid (string):
    The object identifier (OID) of the private key to wrap.
    It is a dotted string, like ``'1.2.840.113549.1.1.1'`` (for RSA keys)
    or ``'1.2.840.10045.2.1'`` (for ECC keys).

Keyword Args:

  passphrase (bytes or string):
    The secret passphrase from which the wrapping key is derived.
    Set it only if encryption is required.

  protection (string):
    The identifier of the algorithm to use for securely wrapping the key.
    Refer to :ref:`the encryption parameters<enc_params>` .
    The default value is ``'PBKDF2WithHMAC-SHA1AndDES-EDE3-CBC'``.

  prot_params (dictionary):
    Parameters for the key derivation function (KDF).
    Refer to :ref:`the encryption parameters<enc_params>` .

  key_params (DER object or None):
    The ``parameters`` field to use in the ``AlgorithmIdentifier``
    SEQUENCE. If ``None``, no ``parameters`` field will be added.
    By default, the ASN.1 type ``NULL`` is used.

  randfunc (callable):
    Random number generation function; it should accept a single integer
    N and return a string of random data, N bytes long.
    If not specified, a new RNG will be instantiated
    from :mod:`Crypto.Random`.

Returns:
  bytes: The PKCS#8-wrapped private key (possibly encrypted).
zEmpty passphrasez"PBKDF2WithHMAC-SHA1AndDES-EDE3-CBC)r   r   r   ÚencodeÚ
ValueErrorÚtobytesr	   Úencrypt)
Úprivate_keyÚkey_oidÚ
passphraseÚ
protectionÚprot_paramsÚ
key_paramsÚrandfuncÚ	algorithmÚpk_infoÚpk_info_ders
   &&&&&&&   Ú†/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/Crypto/IO/PKCS8.pyr   r   2   s¦   € ðj ÒÜ¤¨WÓ!5Ð 6Ó7‰	ä¤¨WÓ!5°zÐ BÓCˆ	äØØÜ˜{Ó+ðó €Gð
 —.‘.Ó"€KàÒØÐçÜÐ+Ó,Ð,ô ˜Ó$€JØÒØ9ˆ
Ü�=Š=˜Ø#°(ó<ð <ó    c                ó’  € Vef   \        V4      pRp \        P                  ! WVR7      p RpV'       g    \        P                  ! WVR7      p RpV'       g   \        R	X,          4      h\        4       P                  V RR
7      p\        V4      ^8X  d   V'       g   \        R4      hV^ ,          ^ 8X  d   \        V4      R9  d   \        R4      hM5V^ ,          ^8X  d   \        V4      R9  d   \        R4      hM\        R4      h\        4       P                  V^,          RR
7      p\        4       P                  V^ ,          4      P                  p\        V4      ^8X  d   Rp	M# \        4       P                  V^,          4       Rp	\        4       P                  V^,          4      P                  p
WŠV	3#   \         d   pR\	        T4      ,          p Rp?EL­Rp?i\
         d    Rp ELÀi ; i  \         d%   pXR\	        T4      ,          ,          p Rp?ELËRp?i\
         d    XR,          p ELåi ; i   T^,          p	 L½; i)ax  Unwrap a private key from a PKCS#8 blob (clear or encrypted).

Args:
  p8_private_key (bytes):
    The private key wrapped into a PKCS#8 container, DER encoded.

Keyword Args:
  passphrase (byte string or string):
    The passphrase to use to decrypt the blob (if it is encrypted).
  max_iteration_count (integer):
    The maximum value allowed for the PBKDF2/scrypt iteration count.
    An attacker could craft a malicious key blob that requires an
    extremely high number of iterations, tying up the CPU for hours.
    The default value is None (enforcing the default limit of 50,000,000).
    Set it to ``0`` to disable the check.

Return:
  A tuple containing

   #. the algorithm identifier of the wrapped key (OID, dotted string)
   #. the private key (bytes, DER encoded)
   #. the associated parameters (bytes, DER encoded) or ``None``

Raises:
  ValueError : if decoding fails
NF)Úmax_iteration_countTz	PBES1[%s]zPBES1[Invalid]z
,PBES2[%s]z,PBES2[Invalid]zError decoding PKCS#8 (%s))Únr_elementsz;Not a valid clear PKCS#8 structure (maybe it is encrypted?)z#Not a valid PrivateKeyInfo SEQUENCE)é   é   é   é   )r#   r$   )r#   r$   r%   )é   r"   )r   r   Údecryptr
   Ústrr   r	   r   ÚdecodeÚlenr   Úvaluer   r   Úpayload)Úp8_private_keyr   r    ÚfoundÚeÚ	error_strr   ÚalgoÚalgo_oidÚalgo_paramsr   s   &&&        r   r   r   �   s  € ð8 ÒÜ˜ZÓ(ˆ
àˆð	)Ü"Ÿ]š]¨>Ø?RôTˆNàˆE÷ ð/Ü!&§¢¨~ØCVô"X�à�÷ ÜÐ9¸IÕEÓFÐFä‹m×"Ñ" >¸|Ð"ÓL€GÜ
ˆ7ƒ|�qÔ§Üð 4ó 5ð 	5ð0 ˆq…z�Q„Üˆw‹<˜vÔ%ÜÐBÓCÐCð &à	���qŒÜˆw‹<˜yÔ(ÜÐBÓCÐCð )ô Ð>Ó?Ð?ä‹=×Ñ ¨¥
¸ÐÓ?€DÜ‹}×#Ñ# D¨¥GÓ,×2Ñ2€HÜ
ˆ4ƒy�A„~Ø‰ð	"Ü‹I×Ñ˜T !�WÔ%ØˆKô
 !Ó"×)Ñ)¨'°!­*Ó5×=Ñ=€Kð  ;Ð/Ð/øôK ô 	-Ø#¤c¨!£fÕ,ŽIûÜô 	)Ø(‹Ið	)ûô ô 3Ø˜\¬C°«FÕ2Õ2–	ûÜô /ØÐ.Õ.“	ð/ûðb	"Ø˜q�'ŠKúsR   “F7 ¶G1 Å'"H9 Æ7G.ÇGÇG.Ç'G.Ç-G.Ç1H6Ç<HÈH6È(
H6È5H6È9I)NN)ÚCrypto.Util.py3compatÚCrypto.Util.asn1r   r   r   r   ÚCrypto.IO._PBESr   r	   r
   r   Ú__all__r   r   © r   r   Ú<module>r9      sG   ðôF $÷ó ÷ RÓ Qð �8Ð
€ð +/¸4Ø¡g£i¸$ôL<ö^i0r   