+
    iS                     z   R t ^ RIHt ^ RIHtHtHtHt ^ RIt	^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIt	^ RIHt ^ RIHt Rt]P6                  ! 4       t]P:                  ! 4       t] ! R R4      4       t ! R R]P@                  4      t! ! R R]PD                  ]PF                  4      t$R# )zAECDSA verifier and signer that use the ``cryptography`` library.
)	dataclass)AnyDictOptionalUnionN)backends)hashes)serialization)ec)padding)decode_dss_signature)encode_dss_signature)_helpers)bases   -----BEGIN CERTIFICATE-----c                   h   a  ] tR t^(t o Rt]V 3R lR l4       t]V 3R lR l4       tV 3R ltRt	V t
R# )	_ESAttributeszA class that models ECDSA attributes.

Attributes:
    rs_size (int): Size for ASN.1 r and s size.
    sha_algo (hashes.HashAlgorithm): Hash algorithm.
    algorithm (str): Algorithm name.
c                ^   < V ^8  d   QhRS[ S[P                  S[P                  3,          /# )   key)r   r
   EllipticCurvePublicKeyEllipticCurvePrivateKey)format__classdict__s   "g/Users/igloo/.openclaw/workspace/scratch/fb_ad_env/lib/python3.14/site-packages/google/auth/crypt/es.py__annotate___ESAttributes.__annotate__7   s+     ) )1123M3MMN)    c                8    V P                  VP                  4      # N)
from_curvecurve)clsr   s   &&r   from_key_ESAttributes.from_key6   s     ~~cii((r   c                4   < V ^8  d   QhRS[ P                  /# )r   r    )r
   EllipticCurve)r   r   s   "r   r   r   =   s     	5 	5r// 	5r   c                    \        V\        P                  4      '       d   V ! ^0\        P                  ! 4       R4      # V ! ^ \        P
                  ! 4       R4      # )0   ES384ES256)
isinstancer
   	SECP384R1r   SHA384SHA256)r!   r    s   &&r   r   _ESAttributes.from_curve<   sA     eR\\**r6==?G44 r6==?G44r   c                R   < V ^8  d   Qh/ S[ ;R&   S[P                  ;R&   S[;R&   # )r   rs_sizesha_algo	algorithm)intr   HashAlgorithmstr)r   r   s   "r   r   r   (   s0      L  """  N r    N)__name__
__module____qualname____firstlineno____doc__classmethodr"   r   __annotate_func____static_attributes____classdictcell__r   s   @r   r   r   (   s9      ) )
 	5 	5+  r   r   c                      a  ] tR t^It o RtV 3R lR lt]P                  ! ]P                  4      V 3R lR l4       t
]V 3R lR l4       tRtV tR	# )

EsVerifierzVerifies ECDSA cryptographic signatures using public keys.

Args:
    public_key (
            cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey):
        The public key used to verify signatures.
c                8   < V ^8  d   QhRS[ P                  RR/# )r   
public_keyreturnN)r
   r   )r   r   s   "r   r   EsVerifier.__annotate__R   s!     > >2#<#< > >r   c                F    Wn         \        P                  V4      V n        R # r   )_pubkeyr   r"   _attributes)selfrD   s   &&r   __init__EsVerifier.__init__R   s    !(11*=r   c                ,   < V ^8  d   QhRS[ RS[ RS[/# )r   message	signaturerE   )bytesbool)r   r   s   "r   r   rF   W   s"      e  $ r   c                f   \         P                  ! V4      p\        V4      V P                  P                  ^,          8w  d   R# \
        P                  VRV P                  P                   RR7      p\
        P                  W0P                  P                  R RR7      p\        WE4      p\         P                  ! V4      p V P                  P                  Wa\        P                  ! V P                  P                  4      4       R#   \        \        P                  P                   3 d     R# i ; i)r   FNbig	byteorderT)r   to_byteslenrI   r0   r3   
from_bytesr   rH   verifyr
   ECDSAr1   
ValueErrorcryptography
exceptionsInvalidSignature)rJ   rN   rO   	sig_bytesrsasn1_sigs   &&&    r   rY   EsVerifier.verifyV   s     %%i0	y>T--5599NN9%?t'7'7'?'?@ENRNN9%5%5%=%=%?@ENR'-##G,	LL288D<L<L<U<U3VWL33DDE 		s   AD %D0/D0c                :   < V ^8  d   QhRS[ S[S[3,          RR/# )r   rD   rE   rB   )r   r5   rP   )r   r   s   "r   r   rF   h   s$      U3:%6 < r   c                J   \         P                  ! V4      p\        V9   d6   \        P                  P                  V\        4      pVP                  4       pM\        P                  ! V\        4      p\        V\        P                  4      '       g   \        R4      hV ! V4      # )aB  Construct a Verifier instance from a public key or public
certificate string.

Args:
    public_key (Union[str, bytes]): The public key in PEM format or the
        x509 public key certificate.

Returns:
    google.auth.crypt.Verifier: The constructed verifier.

Raises:
    ValueError: If the public key can't be parsed.
z2Expected public key of type EllipticCurvePublicKey)r   rV   _CERTIFICATE_MARKERr\   x509load_pem_x509_certificate_BACKENDrD   r	   load_pem_public_keyr*   r
   r   	TypeError)r!   rD   public_key_datacertpubkeys   &&   r   from_stringEsVerifier.from_stringg   s     #++J7/1$$>>D __&F #66QF&"";";<<PQQ6{r   )rI   rH   N)r7   r8   r9   r:   r;   rK   r   copy_docstringr   VerifierrY   r<   ro   r>   r?   r@   s   @r   rB   rB   I   sK     > > T]]+ ,   r   rB   c                   D  a  ] tR t^t o RtRV 3R lR llt]V 3R lR l4       t]]P                  ! ]
P                  4      V 3R lR l4       4       t]P                  ! ]
P                  4      V 3R	 lR
 l4       t]RV 3R lR ll4       tV 3R lR ltV 3R lR ltRtV tR# )EsSignerap  Signs messages with an ECDSA private key.

Args:
    private_key (
            cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey):
        The private key to sign with.
    key_id (str): Optional key ID used to identify this private key. This
        can be useful to associate the private key with its associated
        public key or certificate.
Nc                N   < V ^8  d   QhRS[ P                  RS[S[,          RR/# )r   private_keykey_idrE   N)r
   r   r   r5   )r   r   s   "r   r   EsSigner.__annotate__   s/     ? ?55??G}?	?r   c                R    Wn         W n        \        P                  V4      V n        R # r   )_key_key_idr   r"   rI   )rJ   rv   rw   s   &&&r   rK   EsSigner.__init__   s!      	(11+>r   c                    < V ^8  d   QhRS[ /# r   rE   )r5   )r   r   s   "r   r   rx      s     * *3 *r   c                .    V P                   P                  # )zSName of the algorithm used to sign messages.
Returns:
    str: The algorithm name.
)rI   r2   rJ   s   &r   r2   EsSigner.algorithm   s     )))r   c                0   < V ^8  d   QhRS[ S[,          /# r~   )r   r5   )r   r   s   "r   r   rx      s       r   c                    V P                   # r   )r{   r   s   &r   rw   EsSigner.key_id   s     ||r   c                &   < V ^8  d   QhRS[ RS[ /# )r   rN   rE   )rP   )r   r   s   "r   r   rx      s     
 
E 
e 
r   c                v   \         P                  ! V4      pV P                  P                  V\        P
                  ! V P                  P                  4      4      p\        V4      w  r4VP                  V P                  P                  R R7      VP                  V P                  P                  R R7      ,           # )rS   rT   )
r   rV   rz   signr
   rZ   rI   r1   r   r0   )rJ   rN   asn1_signaturer`   ra   s   &&   r   r   EsSigner.sign   s    ##G,$:J:J:S:S1TU &n5zz$**22ezDqzz$$ HR H
 
 	
r   c                P   < V ^8  d   QhRS[ S[S[3,          RS[S[,          RR/# )r   r   rw   rE   rt   )r   rP   r5   r   )r   r   s   "r   r   rx      s2     / /s
#/-5c]/	/r   c                    \         P                  ! V4      p\        P                  ! VR\        R7      p\        V\        P                  4      '       g   \        R4      hV ! WBR7      # )a  Construct a RSASigner from a private key in PEM format.

Args:
    key (Union[bytes, str]): Private key in PEM format.
    key_id (str): An optional key id used to identify the private key.

Returns:
    google.auth.crypt._cryptography_rsa.RSASigner: The
    constructed signer.

Raises:
    ValueError: If ``key`` is not ``bytes`` or ``str`` (unicode).
    UnicodeDecodeError: If ``key`` is ``bytes`` but cannot be decoded
        into a UTF-8 ``str``.
    ValueError: If ``cryptography`` "Could not deserialize key data."
N)passwordbackendz4Expected private key of type EllipticCurvePrivateKey)rw   )	r   rV   r	   load_pem_private_keyri   r*   r
   r   rk   )r!   r   rw   	key_bytesrv   s   &&&  r   ro   EsSigner.from_string   sW    ( %%c*	#88h
 +r'A'ABBRSS;..r   c                6   < V ^8  d   QhRS[ S[S[3,          /# r~   r   r5   r   )r   r   s   "r   r   rx      s      d38n r   c                   V P                   P                  4       pV P                  P                  \        P
                  P                  \        P                  P                  \        P                  ! 4       R7      VR&   V# )z1Pickle helper that serializes the _key attribute.)encodingr   encryption_algorithmrz   )
__dict__copyrz   private_bytesr	   EncodingPEMPrivateFormatPKCS8NoEncryptionrJ   states   & r   __getstate__EsSigner.__getstate__   sb    ""$		//"++// ..44!.!;!;!= 0 
f
 r   c                :   < V ^8  d   QhRS[ S[S[3,          RR/# )r   r   rE   Nr   )r   r   s   "r   r   rx      s#     $ $$sCx. $T $r   c                ~    \         P                  ! VR,          R4      VR&   V P                  P                  V4       R# )z3Pickle helper that deserializes the _key attribute.rz   N)r	   r   r   updater   s   &&r   __setstate__EsSigner.__setstate__   s.    %::5=$OfU#r   )rI   rz   r{   r   )r7   r8   r9   r:   r;   rK   propertyr2   r   rq   r   Signerrw   r   r<   ro   r   r   r>   r?   r@   s   @r   rt   rt      s     	? ? * * T[[) *  T[[)
 *
 / / /: $ $r   rt   )%r;   dataclassesr   typingr   r   r   r   cryptography.exceptionsr\   cryptography.hazmatr   cryptography.hazmat.primitivesr   r	   )cryptography.hazmat.primitives.asymmetricr
   r   /cryptography.hazmat.primitives.asymmetric.utilsr   r   cryptography.x509google.authr   google.auth.cryptr   rf   default_backendri   PKCS1v15_PADDINGr   rr   rB   r   FromServiceAccountMixinrt   r6   r   r   <module>r      s    " - -  ( 1 8 8 = P P    " 5 ##% 5 5 5@; ;|V$t{{D88 V$r   