§
    ‹r°dÏ$  ã                   óŒ   — d dl mZ d dlmZmZ d dlmZ d dlmZm	Z	m
Z
mZmZmZmZ  edd¦  «        Z G d„ de¦  «        Zd	„ Zd
S )é    )Ú	unhexlify)ÚbordÚtobytes)Úget_random_bytes)Úload_pycryptodome_raw_libÚVoidPointerÚSmartPointerÚcreate_string_bufferÚget_raw_bufferÚc_size_tÚc_uint8_ptrzCrypto.Hash._BLAKE2ba²  
                        int blake2b_init(void **state,
                                         const uint8_t *key,
                                         size_t key_size,
                                         size_t digest_size);
                        int blake2b_destroy(void *state);
                        int blake2b_update(void *state,
                                           const uint8_t *buf,
                                           size_t len);
                        int blake2b_digest(const void *state,
                                           uint8_t digest[64]);
                        int blake2b_copy(const void *src, void *dst);
                        c                   ó@   — e Zd ZdZdZd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
S )ÚBLAKE2b_Hasha–  A BLAKE2b hash object.
    Do not instantiate directly. Use the :func:`new` function.

    :ivar oid: ASN.1 Object ID
    :vartype oid: string

    :ivar block_size: the size in bytes of the internal message block,
                      input to the compression function
    :vartype block_size: integer

    :ivar digest_size: the size in bytes of the resulting hash
    :vartype digest_size: integer
    é@   c           	      ó  — || _         || _        d| _        |dv r|sdt          |¦  «        z   | _        t          ¦   «         }t                               |                     ¦   «         t          |¦  «        t          t          |¦  «        ¦  «        t          |¦  «        ¦  «        }|rt          d|z  ¦  «        ‚t          |                     ¦   «         t          j        ¦  «        | _        |r|                      |¦  «         d S d S )NF)é   é    é0   r   z1.3.6.1.4.1.1722.12.2.1.z$Error %d while instantiating BLAKE2b)Údigest_sizeÚ_update_after_digestÚ_digest_doneÚstrÚoidr   Ú_raw_blake2b_libÚblake2b_initÚ
address_ofr   r   ÚlenÚ
ValueErrorr	   ÚgetÚblake2b_destroyÚ_stateÚupdate)ÚselfÚdataÚkeyÚdigest_bytesÚupdate_after_digestÚstateÚresults          úX/var/www/pp.vulcan-creative.com/venv/lib/python3.11/site-packages/Crypto/Hash/BLAKE2b.pyÚ__init__zBLAKE2b_Hash.__init__L   s  € ð (ˆÔà$7ˆÔ!Ø!ˆÔð Ð+Ð+Ð+°CÐ+Ø1µC¸Ñ4EÔ4EÑEˆDŒHå‘”ˆÝ!×.Ò.¨u×/?Ò/?Ñ/AÔ/AÝ/:¸3Ñ/?Ô/?Ý/7½¸C¹¼Ñ/AÔ/AÝ/7¸Ñ/EÔ/Eñ1ô 1ˆð
 ð 	NÝÐCÀfÑLÑMÔMÐMÝ" 5§9¢9¡;¤;Ý#3Ô#CñEô EˆŒàð 	Ø�KŠK˜ÑÔÐÐÐð	ð 	ó    c           	      ó  — | j         r| j        st          d¦  «        ‚t                               | j                             ¦   «         t          |¦  «        t          t          |¦  «        ¦  «        ¦  «        }|rt          d|z  ¦  «        ‚| S )zµContinue hashing of a message by consuming the next chunk of data.

        Args:
            data (bytes/bytearray/memoryview): The next chunk of the message being hashed.
        z8You can only call 'digest' or 'hexdigest' on this objectz#Error %d while hashing BLAKE2b data)r   r   Ú	TypeErrorr   Úblake2b_updater!   r   r   r   r   r   )r#   r$   r)   s      r*   r"   zBLAKE2b_Hash.updatef   s�   € ð Ôð 	X TÔ%>ð 	XÝÐVÑWÔWÐWå!×0Ò0°´·²Ñ1BÔ1BÝ1<¸TÑ1BÔ1BÝ19½#¸d¹)¼)Ñ1DÔ1DñFô Fˆð ð 	MÝÐBÀVÑKÑLÔLÐLØˆr,   c                 óò   — t          d¦  «        }t                               | j                             ¦   «         |¦  «        }|rt          d|z  ¦  «        ‚d| _        t          |¦  «        d| j        …         S )zçReturn the **binary** (non-printable) digest of the message that has been hashed so far.

        :return: The hash digest, computed over the data processed so far.
                 Binary form.
        :rtype: byte string
        r   z&Error %d while creating BLAKE2b digestTN)	r
   r   Úblake2b_digestr!   r   r   r   r   r   )r#   Úbfrr)   s      r*   ÚdigestzBLAKE2b_Hash.digestx   sx   € õ # 2Ñ&Ô&ˆÝ!×0Ò0°´·²Ñ1BÔ1BØ14ñ6ô 6ˆàð 	PÝÐEÈÑNÑOÔOÐOà ˆÔå˜cÑ"Ô"Ð#4 DÔ$4Ð#4Ô5Ð5r,   c                 ó~   — d                      d„ t          |                      ¦   «         ¦  «        D ¦   «         ¦  «        S )zÝReturn the **printable** digest of the message that has been hashed so far.

        :return: The hash digest, computed over the data processed so far.
                 Hexadecimal encoded.
        :rtype: string
        Ú c                 ó2   — g | ]}d t          |¦  «        z  ‘ŒS )z%02x)r   )Ú.0Úxs     r*   ú
<listcomp>z*BLAKE2b_Hash.hexdigest.<locals>.<listcomp>“   s#   € ÐGÐGÐG¨Q˜¥ a¡¤Ñ(ÐGÐGÐGr,   )ÚjoinÚtupler3   )r#   s    r*   Ú	hexdigestzBLAKE2b_Hash.hexdigest‹   s5   € ð �wŠwÐGÐGµ%¸¿º¹¼Ñ2FÔ2FÐGÑGÔGÑHÔHÐHr,   c                 ó  — t          d¦  «        }t          d||¬¦  «        }t          d||                      ¦   «         ¬¦  «        }|                     ¦   «         |                     ¦   «         k    rt          d¦  «        ‚dS )a`  Verify that a given **binary** MAC (computed by another party)
        is valid.

        Args:
          mac_tag (bytes/bytearray/memoryview): the expected MAC of the message.

        Raises:
            ValueError: if the MAC does not match. It means that the message
                has been tampered with or that the MAC key is incorrect.
        é   é    )Údigest_bitsr%   r$   zMAC check failedN)r   Únewr3   r   )r#   Úmac_tagÚsecretÚmac1Úmac2s        r*   ÚverifyzBLAKE2b_Hash.verify–   ss   € õ " "Ñ%Ô%ˆå˜s¨°WÐ=Ñ=Ô=ˆÝ˜s¨°T·[²[±]´]ÐCÑCÔCˆà�;Š;‰=Œ=˜DŸKšK™MœMÒ)Ð)ÝÐ/Ñ0Ô0Ð0ð *Ð)r,   c                 ód   — |                       t          t          |¦  «        ¦  «        ¦  «         dS )an  Verify that a given **printable** MAC (computed by another party)
        is valid.

        Args:
            hex_mac_tag (string): the expected MAC of the message, as a hexadecimal string.

        Raises:
            ValueError: if the MAC does not match. It means that the message
                has been tampered with or that the MAC key is incorrect.
        N)rF   r   r   )r#   Úhex_mac_tags     r*   Ú	hexverifyzBLAKE2b_Hash.hexverify«   s,   € ð 	�Š•I�g kÑ2Ô2Ñ3Ô3Ñ4Ô4Ð4Ð4Ð4r,   c                 ó>   — d|vrd|vr
| j         |d<   t          di |¤ŽS )zQReturn a new instance of a BLAKE2b hash object.
        See :func:`new`.
        r&   r@   © )r   rA   )r#   Úkwargss     r*   rA   zBLAKE2b_Hash.newº   s6   € ð
  Ð'Ð'¨MÀÐ,GÐ,GØ%)Ô%5ˆF�>Ñ"åˆ}ˆ}�Vˆ}ˆ}Ðr,   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
block_sizer+   r"   r3   r<   rF   rI   rA   rK   r,   r*   r   r   :   s‘   € € € € € ðð ð €Jðð ð ð4ð ð ð$6ð 6ð 6ð&Ið Ið Ið1ð 1ð 1ð*5ð 5ð 5ðð ð ð ð r,   r   c                  óZ  — |                       dd¦  «        }|                       dd¦  «        }|                       dd¦  «        }|                       dd¦  «        }d||fvrt          d¦  «        ‚d||fk    rd	}|�d
|cxk    rd	k    sn t          d¦  «        ‚n)d|cxk    rdk    rn n|dz  rt          d¦  «        ‚|dz  }|                       dd¦  «        }t          |¦  «        d	k    rt          d¦  «        ‚| rt          dt	          | ¦  «        z   ¦  «        ‚t          ||||¦  «        S )a×  Create a new hash object.

    Args:
        data (bytes/bytearray/memoryview):
            Optional. The very first chunk of the message to hash.
            It is equivalent to an early call to :meth:`BLAKE2b_Hash.update`.
        digest_bytes (integer):
            Optional. The size of the digest, in bytes (1 to 64). Default is 64.
        digest_bits (integer):
            Optional and alternative to ``digest_bytes``.
            The size of the digest, in bits (8 to 512, in steps of 8).
            Default is 512.
        key (bytes/bytearray/memoryview):
            Optional. The key to use to compute the MAC (1 to 64 bytes).
            If not specified, no key will be used.
        update_after_digest (boolean):
            Optional. By default, a hash object cannot be updated anymore after
            the digest is computed. When this flag is ``True``, such check
            is no longer enforced.

    Returns:
        A :class:`BLAKE2b_Hash` hash object
    r$   Nr'   Fr&   r@   z*Only one digest parameter must be provided)NNr   é   z!'digest_bytes' not in range 1..64é   i   z2'digest_bits' not in range 8..512, with steps of 8r%   r,   z"BLAKE2b key cannot exceed 64 byteszUnknown parameters: )Úpopr.   r   r   r   r   )rL   r$   r'   r&   r@   r%   s         r*   rA   rA   Å   su  € ð2 �:Š:�f˜dÑ#Ô#€DØ Ÿ*š*Ð%:¸EÑBÔBÐà—:’:˜n¨dÑ3Ô3€LØ—*’*˜]¨DÑ1Ô1€KØ�L +Ð.Ð.Ð.ÝÐDÑEÔEÐEØ˜ kÐ2Ò2Ð2ØˆØÐØ�\Ð'Ð'Ò'Ð' RÒ'Ð'Ð'Ð'ÝÐ@ÑAÔAÐAð (ð �[Ð'Ð'Ò'Ð' CÒ'Ð'Ð'Ð'Ð'¨[¸1©_Ð'Ýð /ñ 0ô 0ð 0à" aÑ'ˆà
�*Š*�U˜CÑ
 Ô
 €CÝ
ˆ3�x„x�"‚}€}ÝÐ=Ñ>Ô>Ð>àð >ÝÐ.µ°V±´Ñ<Ñ=Ô=Ð=å˜˜c <Ð1DÑEÔEÐEr,   N)Úbinasciir   ÚCrypto.Util.py3compatr   r   ÚCrypto.Randomr   ÚCrypto.Util._raw_apir   r   r	   r
   r   r   r   r   Úobjectr   rA   rK   r,   r*   ú<module>r[      s  ðð> Ð Ð Ð Ð Ð à /Ð /Ð /Ð /Ð /Ð /Ð /Ð /à *Ð *Ð *Ð *Ð *Ð *ð/ð /ð /ð /ð /ð /ð /ð /ð /ð /ð /ð /ð /ð /ð /ð /ð /ð /ð -Ð,Ð-Cðñô Ð ð Hð Hð Hð Hð H�6ñ Hô Hð HðV2Fð 2Fð 2Fð 2Fð 2Fr,   