Ë
    (üàgÍ  ã                   óz   — 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y)é    )Ú_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y)Ú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           
      ód  — t        |«      t        vrt        dt        |«      z  «      ‚t        |«      dk7  rt        dt        |«      z  «      ‚t        dd|«      | _        t        «       | _        t        j                  t        |«      t        t        |«      «      t        |«      t        t        |«      «      | j                  j                  «       «      }|rt        d«      ‚t        | j                  j                  «       t        j                  «      | _        d| _        t        |«      | _        y)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       úS/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/Crypto/Cipher/Salsa20.pyÚ__init__zSalsa20Cipher.__init__6   sø   € ô
 ˆs‹8œ8Ñ#ÜÐJÌSÐQTËXÑUÓVÐVäˆu‹:˜Š?ÜÐLÜ  ›Zñ(ó )ð )ô !  t¨UÓ3ˆŒ
ä!“mˆŒÜ!×5Ñ5Ü# CÓ(Ü ¤ S£Ó*Ü# EÓ*Ü ¤ U£Ó,ØŸ™×.Ñ.Ó0ó2ˆñ ÜÐFÓGÐGÜ" 4§;¡;§?¡?Ó#4Ü#3×#JÑ#JóLˆŒð ˆŒÜ˜C›ˆ�ó    Nc           
      ó   — |€t        t        |«      «      }nF|}t        |«      st        d«      ‚t        |«      t        |«      k7  rt	        dt        |«      z  «      ‚t
        j                  | j                  j                  «       t        |«      t        |«      t        t        |«      «      «      }|rt	        d|z  «      ‚|€t        |«      S y)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Ó=‰JàˆJä& vÔ.ÜÐ VÓWÐWä�9‹~¤ V£Ò,Ü ð "0Ü25°i³.ñ"Aó Bð Bô "×8Ñ8Ø)-¯©¯©Ó):Ü)4°YÓ)?Ü)4°ZÓ)@Ü)1´#°i³.Ó)Aó	Cˆñ
 ÜÐEÈÑNÓOÐOàˆ>Ü! *Ó-Ð-àr"   c                 ó”   — 	 | j                  ||¬«      S # t        $ r)}t        t        |«      j                  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   sD   € ð	;Ø—<‘< 
°6�<Ó:Ð:øÜò 	;ÜœS ›VŸ^™^¨E°5Ó9Ó:Ð:ûð	;ús   ‚ •	Až$AÁA©N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r!   r)   r0   © r"   r    r   r   .   s   „ ñò!ó:$ôL;r"   r   Nc                 ó4   — |€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
    r   )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>      sT   ðõ2 .÷D÷ Dó Dõ +á,Ð-Eðó	Ð ÷[;ñ [;ó|%ð. €
ð �r"   