
    (ph^                         S r SSKrSSKrSSKrSSKJr  SrSr " S S\R                  S9r	 " S	 S
\R                  S9r
 " S S\R                  S9rg)z5Base classes for cryptographic signers and verifiers.    N)
exceptionsprivate_keyprivate_key_idc                   <    \ rS rSrSr\R                  S 5       rSrg)Verifier   z9Abstract base class for crytographic signature verifiers.c                     [        S5      e)aI  Verifies a message against a cryptographic signature.

Args:
    message (Union[str, bytes]): The message to verify.
    signature (Union[str, bytes]): The cryptography signature to check.

Returns:
    bool: True if message was signed by the private key associated
    with the public key that this object was constructed with.
zVerify must be implementedNotImplementedError)selfmessage	signatures      I/var/www/html/venv/lib/python3.13/site-packages/google/auth/crypt/base.pyverifyVerifier.verify   s     "">??     N)	__name__
__module____qualname____firstlineno____doc__abcabstractmethodr   __static_attributes__r   r   r   r   r      s    C@ @r   r   )	metaclassc                   `    \ rS rSrSr\R                  S 5       r\R                  S 5       r	Sr
g)Signer/   z.Abstract base class for cryptographic signers.c                     [        S5      e)z<Optional[str]: The key ID used to identify this private key.zKey id must be implementedr
   )r   s    r   key_idSigner.key_id2   s     "">??r   c                     [        S5      e)zSigns a message.

Args:
    message (Union[str, bytes]): The message to be signed.

Returns:
    bytes: The signature of the message.
zSign must be implementedr
   )r   r   s     r   signSigner.sign7   s     ""<==r   r   N)r   r   r   r   r   r   abstractpropertyr!   r   r$   r   r   r   r   r   r   /   s9    8@ @ 	> >r   r   c                   `    \ rS rSrSr\R                  SS j5       r\S 5       r	\S 5       r
Srg)	FromServiceAccountMixinF   z3Mix-in to enable factory constructors for a Signer.Nc                     [        S5      e)a$  Construct an Signer instance from a private key string.

Args:
    key (str): Private key as a string.
    key_id (str): An optional key id used to identify the private key.

Returns:
    google.auth.crypt.Signer: The constructed signer.

Raises:
    ValueError: If the key cannot be parsed.
zfrom_string must be implementedr
   )clskeyr!   s      r   from_string#FromServiceAccountMixin.from_stringI   s     ""CDDr   c                     [         U;  a  [        R                  " S5      eU R                  U[            UR	                  [
        5      5      $ )aC  Creates a Signer instance instance from a dictionary containing
service account info in Google format.

Args:
    info (Mapping[str, str]): The service account info in Google
        format.

Returns:
    google.auth.crypt.Signer: The constructed signer.

Raises:
    ValueError: If the info is not in the expected format.
z@The private_key field was not found in the service account info.)_JSON_FILE_PRIVATE_KEYr   MalformedErrorr-   get_JSON_FILE_PRIVATE_KEY_ID)r+   infos     r   from_service_account_info1FromServiceAccountMixin.from_service_account_infoY   sJ     "-++U  '($((3L*M
 	
r   c                     [         R                  " USSS9 n[        R                  " U5      nSSS5        U R	                  W5      $ ! , (       d  f       N= f)zCreates a Signer instance from a service account .json file
in Google format.

Args:
    filename (str): The path to the service account .json file.

Returns:
    google.auth.crypt.Signer: The constructed signer.
rzutf-8)encodingN)ioopenjsonloadr5   )r+   filename	json_filedatas       r   from_service_account_file1FromServiceAccountMixin.from_service_account_fileq   sE     WWXsW599Y'D 6 ,,T22 65s   A
Ar   )N)r   r   r   r   r   r   r   r-   classmethodr5   rA   r   r   r   r   r(   r(   F   sG    =E E 
 
. 3 3r   r(   )r   r   r:   r<   google.authr   r0   r3   ABCMetar   r   r(   r   r   r   <module>rF      sT    < 
 	  "& , @ @(>s{{ >.93 93r   