+
    Ai                     @    ^RI HtHt  ! R R4      t ! R R]4      tR# )   )base64url_encodeensure_binaryc                   h   a  ] tR t^t o RtR tR tR tR tR t	R t
RR	 ltRR
 ltR tR tRtV tR# )Keyz/
A simple interface for implementing JWK keys.
c                    R # N )selfkey	algorithms   &&&P/var/www/html/photoedit/myenv/lib/python3.14/site-packages/jose/backends/base.py__init__Key.__init__	   s        c                    \        4       hr   NotImplementedError)r
   msgs   &&r   signKey.sign       !##r   c                    \        4       hr   r   )r
   r   sigs   &&&r   verify
Key.verify   r   r   c                    \        4       hr   r   r
   s   &r   
public_keyKey.public_key   r   r   c                    \        4       hr   r   r   s   &r   to_pem
Key.to_pem   r   r   c                    \        4       hr   r   r   s   &r   to_dictKey.to_dict   r   r   Nc                    \        4       h)a  
Encrypt the plain text and generate an auth tag if appropriate

Args:
    plain_text (bytes): Data to encrypt
    aad (bytes, optional): Authenticated Additional Data if key's algorithm supports auth mode

Returns:
    (bytes, bytes, bytes): IV, cipher text, and auth tag
r   )r
   
plain_textaads   &&&r   encryptKey.encrypt   s     "##r   c                    \        4       h)a1  
Decrypt the cipher text and validate the auth tag if present
Args:
    cipher_text (bytes): Cipher text to decrypt
    iv (bytes): IV if block mode
    aad (bytes): Additional Authenticated Data to verify if auth mode
    tag (bytes): Authentication tag if auth mode

Returns:
    bytes: Decrypted value
r   )r
   cipher_textivr(   tags   &&&&&r   decryptKey.decrypt(   s     "##r   c                    \        4       h)zq
Wrap the the plain text key data

Args:
    key_data (bytes): Key data to wrap

Returns:
    bytes: Wrapped key
r   )r
   key_datas   &&r   wrap_keyKey.wrap_key6        "##r   c                    \        4       h)z
Unwrap the the wrapped key data

Args:
    wrapped_key (bytes): Wrapped key data to unwrap

Returns:
    bytes: Unwrapped key
r   )r
   wrapped_keys   &&r   
unwrap_keyKey.unwrap_keyB   r5   r   r	   r   )NNN)__name__
__module____qualname____firstlineno____doc__r   r   r   r   r!   r$   r)   r/   r3   r8   __static_attributes____classdictcell____classdict__s   @r   r   r      sA     $$$$$$$
$
$ 
$r   r   c                   ,   a  ] tR t^Ot o R tR tRtV tR# )DIRKeyc                2    \        V4      V n        W n        R # r   )r   _key_alg)r
   r2   r   s   &&&r   r   DIRKey.__init__P   s    !(+		r   c                L    R V P                   RRR\        V P                  4      /# )algktyoctk)rG   r   rF   r   s   &r   r$   DIRKey.to_dictT   s)    4995!$)),
 	
r   )rG   rF   N)r:   r;   r<   r=   r   r$   r?   r@   rA   s   @r   rD   rD   O   s     
 
r   rD   N)utilsr   r   r   rD   r	   r   r   <module>rP      s!    3H$ H$V

S 

r   