/opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Cipher/__pycache__
Edit: /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Cipher/__pycache__/Salsa20.cpython-311.pyc (6754B)
§
NÑåHreã óˆ — d dl mZ d dlmZmZmZmZmZmZm Z m
Z
d dlmZ edd¦ « Z
G d„ d¦ « Zdd „Zd
ZdZdS )
é )Ú_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_byteszCrypto.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 Zd ZdZd„ Zdd„Zdd„ZdS )Ú
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 vrt dt |¦ « z ¦ « ‚t |¦ « dk rt dt |¦ « z ¦ « ‚t dd|¦ « | _ t ¦ « | _ t t |¦ « t t |¦ « ¦ « t |¦ « t t |¦ « ¦ « | j ¦ « ¦ « }|rt d¦ « ‚t | j
¦ « t j ¦ « | _ d| _ t |¦ « | _ dS )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 úw/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Cipher/Salsa20.pyÚ__init__zSalsa20Cipher.__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 |¦ « st d¦ « ‚t |¦ « t |¦ « k rt dt |¦ « z ¦ « ‚t
| j ¦ « t |¦ « t |¦ « t t |¦ « ¦ « ¦ « }|rt d|z ¦ « ‚|€t |¦ « S dS )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 ÚencryptzSalsa20Cipher.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 |¦ « dd¦ « ¦ « ‚d}~ww xY 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 ÚdecryptzSalsa20Cipher.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&