
    g                    x   d dl mZ d dlZd dlmZ g dZ G d dej                        Z G d d	ej                        Z	ej                  j                  Ze	j                  e        G d
 dej                        Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d  d!e      Z G d" d#ee      Z G d$ d%ee      Z G d& d'e      Z G d( d)e      Z G d* d+e      Z G d, d-e      Zy).    )annotationsN)openssl)MD5SHA1SHA3_224SHA3_256SHA3_384SHA3_512SHA224SHA256SHA384SHA512
SHA512_224
SHA512_256SHAKE128SHAKE256SM3BLAKE2bBLAKE2sExtendableOutputFunctionHashHashAlgorithmHashContextc                      e Zd Zeej
                  dd              Zeej
                  dd              Zeej
                  dd              Zy)r   c                     y)zH
        A string naming this algorithm (e.g. "sha256", "md5").
        N selfs    /var/www/html/FastMealFinder_FlaskServer-InitialRelease/venv/lib/python3.12/site-packages/cryptography/hazmat/primitives/hashes.pynamezHashAlgorithm.name%           c                     y)z<
        The size of the resulting digest in bytes.
        Nr   r   s    r   digest_sizezHashAlgorithm.digest_size,   r!   r"   c                     y)z
        The internal block size of the hash function, or None if the hash
        function does not use blocks internally (e.g. SHA3).
        Nr   r   s    r   
block_sizezHashAlgorithm.block_size3   r!   r"   N)returnstrr'   int)r'   z
int | None)	__name__
__module____qualname__propertyabcabstractmethodr    r$   r&   r   r"   r   r   r   $   sf      
   
   r"   r   )	metaclassc                      e Zd Zeej
                  dd              Zej
                  dd       Zej
                  dd       Zej
                  d	d       Z	y)
r   c                     y)zD
        A HashAlgorithm that will be used by this context.
        Nr   r   s    r   	algorithmzHashContext.algorithm=   r!   r"   c                     y)z@
        Processes the provided bytes through the hash.
        Nr   )r   datas     r   updatezHashContext.updateD   r!   r"   c                     y)zR
        Finalizes the hash context and returns the hash digest as bytes.
        Nr   r   s    r   finalizezHashContext.finalizeJ   r!   r"   c                     y)zM
        Return a HashContext that is a copy of the current context.
        Nr   r   s    r   copyzHashContext.copyP   r!   r"   N)r'   r   )r6   bytesr'   None)r'   r<   )r'   r   )
r+   r,   r-   r.   r/   r0   r4   r7   r9   r;   r   r"   r   r   r   <   sp      
 	 
 	 
 	 r"   r   c                      e Zd ZdZy)r   z7
    An interface for extendable output functions.
    N)r+   r,   r-   __doc__r   r"   r   r   r   [   s    r"   r   c                      e Zd ZdZdZdZy)r   sha1   @   Nr+   r,   r-   r    r$   r&   r   r"   r   r   r   a   s    DKJr"   r   c                      e Zd ZdZdZdZy)r   z
sha512-224      NrD   r   r"   r   r   r   g       DKJr"   r   c                      e Zd ZdZdZdZy)r   z
sha512-256    rG   NrD   r   r"   r   r   r   m   rH   r"   r   c                      e Zd ZdZdZdZy)r   sha224rF   rC   NrD   r   r"   r   r   r   s       DKJr"   r   c                      e Zd ZdZdZdZy)r   sha256rJ   rC   NrD   r   r"   r   r   r   y   rM   r"   r   c                      e Zd ZdZdZdZy)r   sha3840   rG   NrD   r   r"   r   r   r          DKJr"   r   c                      e Zd ZdZdZdZy)r   sha512rC   rG   NrD   r   r"   r   r   r      rS   r"   r   c                      e Zd ZdZdZdZy)r   zsha3-224rF   NrD   r   r"   r   r   r          DKJr"   r   c                      e Zd ZdZdZdZy)r   zsha3-256rJ   NrD   r   r"   r   r   r      rW   r"   r   c                      e Zd ZdZdZdZy)r	   zsha3-384rR   NrD   r   r"   r   r	   r	      rW   r"   r	   c                      e Zd ZdZdZdZy)r
   zsha3-512rC   NrD   r   r"   r   r
   r
      rW   r"   r
   c                  .    e Zd ZdZdZddZedd       Zy)r   shake128Nc                h    t        |t              st        d      |dk  rt        d      || _        y Nzdigest_size must be an integer   z&digest_size must be a positive integer
isinstancer*   	TypeError
ValueError_digest_sizer   r$   s     r   __init__zSHAKE128.__init__   3    +s+<==?EFF'r"   c                    | j                   S Nrd   r   s    r   r$   zSHAKE128.digest_size          r"   r$   r*   r)   r+   r,   r-   r    r&   rf   r.   r$   r   r"   r   r   r      %    DJ( ! !r"   r   c                  .    e Zd ZdZdZddZedd       Zy)r   shake256Nc                h    t        |t              st        d      |dk  rt        d      || _        y r^   r`   re   s     r   rf   zSHAKE256.__init__   rg   r"   c                    | j                   S ri   rj   r   s    r   r$   zSHAKE256.digest_size   rk   r"   rl   r)   rm   r   r"   r   r   r      rn   r"   r   c                      e Zd ZdZdZdZy)r   md5   rC   NrD   r   r"   r   r   r          DKJr"   r   c                  6    e Zd ZdZdZdZdZddZed	d       Z	y)
r   blake2brC   r_   rG   c                2    |dk7  rt        d      || _        y )NrC   zDigest size must be 64rc   rd   re   s     r   rf   zBLAKE2b.__init__       "566'r"   c                    | j                   S ri   rj   r   s    r   r$   zBLAKE2b.digest_size   rk   r"   Nrl   r)   )
r+   r,   r-   r    _max_digest_size_min_digest_sizer&   rf   r.   r$   r   r"   r   r   r      s1    DJ( ! !r"   r   c                  6    e Zd ZdZdZdZdZddZed	d       Z	y)
r   blake2srC   rJ   r_   c                2    |dk7  rt        d      || _        y )NrJ   zDigest size must be 32rz   re   s     r   rf   zBLAKE2s.__init__   r{   r"   c                    | j                   S ri   rj   r   s    r   r$   zBLAKE2s.digest_size   rk   r"   Nrl   r)   )
r+   r,   r-   r    r&   r}   r~   rf   r.   r$   r   r"   r   r   r      s1    DJ( ! !r"   r   c                      e Zd ZdZdZdZy)r   sm3rJ   rC   NrD   r   r"   r   r   r      rv   r"   r   )
__future__r   r/   "cryptography.hazmat.bindings._rustr   rust_openssl__all__ABCMetar   r   hashesr   registerr   r   r   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r"   r   <module>r      s:  
 # 
 F2ckk 0CKK 6    T  =   ] ] ] ] } } } } !}6 !$!}6 !$- !m !"!m !"- r"   