§
    ‹r°dÍ  ã                   óˆ   — d dl mZ d dlmZmZmZmZmZmZm	Z	m
Z
 d dlmZ  edd¦  «        Z G d„ d¦  «        Zdd	„Zd
ZdZdS )é    )Ú_copy_bytes)Úload_pycryptodome_raw_libÚcreate_string_bufferÚget_raw_bufferÚVoidPointerÚSmartPointerÚc_size_tÚc_uint8_ptrÚis_writeable_buffer)Úget_random_byteszCrypto.Cipher._Salsa20aþ  
                    int Salsa20_stream_init(uint8_t *key, size_t keylen,
                                            uint8_t *nonce, size_t nonce_len,
                                            void **pSalsaState);
                    int Salsa20_stream_destroy(void *salsaState);
                    int Salsa20_stream_encrypt(void *salsaState,
                                               const uint8_t in[],
                                               uint8_t out[], size_t len);
                    c                   ó(   — e Zd ZdZd„ Zdd„Zdd„ZdS )ÚSalsa20CipherzŸSalsa20 cipher object. Do not create it directly. Use :py:func:`new`
    instead.

    :var nonce: The nonce with length 8
    :vartype nonce: byte string
    c           
      óð  — t          |¦  «        t          vrt          dt          |¦  «        z  ¦  «        ‚t          |¦  «        dk    rt          dt          |¦  «        z  ¦  «        ‚t          dd|¦  «        | _        t          ¦   «         | _        t                               t          |¦  «        t          t          |¦  «        ¦  «        t          |¦  «        t          t          |¦  «        ¦  «        | j                             ¦   «         ¦  «        }|rt          d¦  «        ‚t          | j                             ¦   «         t          j        ¦  «        | _        d| _        t          |¦  «        | _        dS )zQInitialize a Salsa20 cipher object

        See also `new()` at the module level.z+Incorrect key length for Salsa20 (%d bytes)é   z-Incorrect nonce length for Salsa20 (%d bytes)Nz'Error %d instantiating a Salsa20 cipheré   )ÚlenÚkey_sizeÚ
ValueErrorr   Únoncer   Ú_stateÚ_raw_salsa20_libÚSalsa20_stream_initr
   r	   Ú
address_ofr   ÚgetÚSalsa20_stream_destroyÚ
block_size)ÚselfÚkeyr   Úresults       úZ/var/www/pp.vulcan-creative.com/venv/lib/python3.11/site-packages/Crypto/Cipher/Salsa20.pyÚ__init__zSalsa20Cipher.__init__6   s;  € õ
 ˆs‰8Œ8�8Ð#Ð#ÝÐJÍSÐQTÉXÌXÑUÑVÔVÐVåˆu‰:Œ:˜Š?ˆ?ÝÐLÝ  ™ZœZñ(ñ )ô )ð )õ !  t¨UÑ3Ô3ˆŒ
å!‘m”mˆŒÝ!×5Ò5Ý# CÑ(Ô(Ý ¥ S¡¤Ñ*Ô*Ý# EÑ*Ô*Ý ¥ U¡¤Ñ,Ô,Øœ×.Ò.Ñ0Ô0ñ2ô 2ˆð ð 	HÝÐFÑGÔGÐGÝ" 4¤;§?¢?Ñ#4Ô#4Ý#3Ô#JñLô LˆŒð ˆŒÝ˜C™œˆŒˆˆó    Nc           
      ó  — |€t          t          |¦  «        ¦  «        }n_|}t          |¦  «        st          d¦  «        ‚t          |¦  «        t          |¦  «        k    rt	          dt          |¦  «        z  ¦  «        ‚t
                               | j                             ¦   «         t          |¦  «        t          |¦  «        t          t          |¦  «        ¦  «        ¦  «        }|rt	          d|z  ¦  «        ‚|€t          |¦  «        S dS )a«  Encrypt a piece of data.

        Args:
          plaintext(bytes/bytearray/memoryview): The data to encrypt, of any size.
        Keyword Args:
          output(bytes/bytearray/memoryview): The location where the ciphertext
            is written to. If ``None``, the ciphertext is returned.
        Returns:
          If ``output`` is ``None``, the ciphertext is returned as ``bytes``.
          Otherwise, ``None``.
        Nz4output must be a bytearray or a writeable memoryviewz9output must have the same length as the input  (%d bytes)z&Error %d while encrypting with Salsa20)r   r   r   Ú	TypeErrorr   r   ÚSalsa20_stream_encryptr   r   r
   r	   r   )r   Ú	plaintextÚoutputÚ
ciphertextr   s        r    ÚencryptzSalsa20Cipher.encryptS   s	  € ð ˆ>Ý-­c°)©n¬nÑ=Ô=ˆJˆJàˆJå& vÑ.Ô.ð XÝÐ VÑWÔWÐWå�9‰~Œ~¥ V¡¤Ò,Ð,Ý ð "0Ý25°i±.´.ñ"Añ Bô Bð Bõ "×8Ò8Ø)-¬¯ªÑ):Ô):Ý)4°YÑ)?Ô)?Ý)4°ZÑ)@Ô)@Ý)1µ#°i±.´.Ñ)AÔ)Añ	Cô Cˆð
 ð 	PÝÐEÈÑNÑOÔOÐOàˆ>Ý! *Ñ-Ô-Ð-à�4r"   c                 ó¶   — 	 |                       ||¬¦  «        S # t          $ r5}t          t          |¦  «                             dd¦  «        ¦  «        ‚d}~ww xY w)a±  Decrypt a piece of data.
        
        Args:
          ciphertext(bytes/bytearray/memoryview): The data to decrypt, of any size.
        Keyword Args:
          output(bytes/bytearray/memoryview): The location where the plaintext
            is written to. If ``None``, the plaintext is returned.
        Returns:
          If ``output`` is ``None``, the plaintext is returned as ``bytes``.
          Otherwise, ``None``.
        )r'   ÚencÚdecN)r)   r   ÚstrÚreplace)r   r(   r'   Úes       r    ÚdecryptzSalsa20Cipher.decrypty   s^   € ð	;Ø—<’< 
°6�<Ñ:Ô:Ð:øÝð 	;ð 	;ð 	;Ý�S ™VœVŸ^š^¨E°5Ñ9Ô9Ñ:Ô:Ð:øøøøð	;øøøs   ‚ ™
A£0AÁA©N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r!   r)   r0   © r"   r    r   r   .   sV   € € € € € ðð ð!ð !ð !ð:$ð $ð $ð $ðL;ð ;ð ;ð ;ð ;ð ;r"   r   Nc                 óD   — |€t          d¦  «        }t          | |¦  «        S )a%  Create a new Salsa20 cipher

    :keyword key: The secret key to use. It must be 16 or 32 bytes long.
    :type key: bytes/bytearray/memoryview

    :keyword nonce:
        A value that must never be reused for any other encryption
        done with this key. It must be 8 bytes long.

        If not provided, a random byte string will be generated (you can read
        it back via the ``nonce`` attribute of the returned object).
    :type nonce: bytes/bytearray/memoryview

    :Return: a :class:`Crypto.Cipher.Salsa20.Salsa20Cipher` object
    Nr   )r   r   )r   r   s     r    Únewr8   Œ   s&   € ð" €}Ý  Ñ#Ô#ˆå˜˜eÑ$Ô$Ð$r"   r   )é   é    r1   )ÚCrypto.Util.py3compatr   ÚCrypto.Util._raw_apir   r   r   r   r   r	   r
   r   ÚCrypto.Randomr   r   r   r8   r   r   r6   r"   r    ú<module>r>      s  ðð2 .Ð -Ð -Ð -Ð -Ð -ðDð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð Dð +Ð *Ð *Ð *Ð *Ð *à,Ð,Ð-Eðñ	ô 	Ð ð[;ð [;ð [;ð [;ð [;ñ [;ô [;ð [;ð|%ð %ð %ð %ð. €
ð €€€r"   