https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/nacl/bindings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/nacl/bindings/crypto_generichash.pyc
�
y�\c@`s,ddlmZmZmZddlmZddlmZddl	m
Z
mZddlm
Z
ej�Zej�Zej�Zej�Zej�Zej�Zej�Zej�Zej�ZdZ dZ!d�Z"ed	d	d	d
�Z#d	d	d	ed�Z$d�Z%d
�Z&d�Z'dS(i(tabsolute_importtdivisiontprint_function(t
integer_types(t
exceptions(tffitlib(tensures!{0} length greater than {1} bytess{0} greater than {1}cC`s2tt|t�ddtj�tt|t�ddtj�tt|t�ddtj�tt|t�ddtj�t|tktjdt�dtj	�tt
|�tktjdt�dtj	�tt
|�t
ktjdt
�dtj	�tt
|�tktjd	t�dtj	�d
S(sCheck hash paramterssKey must be a bytes sequencetraisingsSalt must be a bytes sequencesPerson must be a bytes sequences%Digest size must be an integer numbertDigest_sizetKeytSalttPersonN(Rt
isinstancetbytestexct	TypeErrorRtcrypto_generichash_BYTES_MAXt_TOOBIGtformatt
ValueErrortlentcrypto_generichash_KEYBYTES_MAXt	_OVERLONGtcrypto_generichash_SALTBYTESt crypto_generichash_PERSONALBYTES(tdigest_sizetkeytsalttperson((sB/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_generichash.pyt_checkparams's0






tc		C`s�t||||�tt|t�ddtj�tjd|�}tjdt�}tjdt	�}tj
||t|��tj
||t|��tj
|||t|�|t|�||�}t|dkddtj�tj||�S(sLOne shot hash interface

    :param data: the input data to the hash function
    :param digest_size: must be at most
                        :py:data:`.crypto_generichash_BYTES_MAX`;
                        the default digest size is
                        :py:data:`.crypto_generichash_BYTES`
    :type digest_size: int
    :param key: must be at most
                :py:data:`.crypto_generichash_KEYBYTES_MAX` long
    :type key: bytes
    :param salt: must be at most
                 :py:data:`.crypto_generichash_SALTBYTES` long;
                 will be zero-padded if needed
    :type salt: bytes
    :param person: must be at most
                   :py:data:`.crypto_generichash_PERSONALBYTES` long:
                   will be zero-padded if needed
    :type person: bytes
    :return: digest_size long digest
    :rtype: bytes
    s#Input data must be a bytes sequenceRsunsigned char[]sunsigned char []isUnexpected failure(RRR
RRRRtnewRRtmemmoveRRt(crypto_generichash_blake2b_salt_personaltRuntimeErrortbuffer(	tdataRRRRtdigestt_saltt_persontrc((sB/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_generichash.pyt!generichash_blake2b_salt_personalJs 

cC`s�t||||�tjdt�}tjdt�}tjdt�}tj||t|��tj||t|��tj	||t|�|||�}t
|dkddtj�|S(s7
    Create a new initialized blake2b hash state

    :param key: must be at most
                :py:data:`.crypto_generichash_KEYBYTES_MAX` long
    :type key: bytes
    :param salt: must be at most
                 :py:data:`.crypto_generichash_SALTBYTES` long;
                 will be zero-padded if needed
    :type salt: bytes
    :param person: must be at most
                   :py:data:`.crypto_generichash_PERSONALBYTES` long:
                   will be zero-padded if needed
    :type person: bytes
    :param digest_size: must be at most
                        :py:data:`.crypto_generichash_BYTES_MAX`;
                        the default digest size is
                        :py:data:`.crypto_generichash_BYTES`
    :type digest_size: int
    :return: an initizialized state buffer
    :rtype: object
    sunsigned char[]sunsigned char []isUnexpected failureR(
RRR tcrypto_generichash_STATEBYTESRRR!RRt-crypto_generichash_blake2b_init_salt_personalRRR#(RRRRtstatebufR'R(R)((sB/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_generichash.pytgenerichash_blake2b_init}s	
cC`sZtt|t�ddtj�tj||t|��}t|dkddtj�dS(s�Update the blake2b hash state

    :param statebuf: an initialized blake2b state buffer as returned from
                     :py:func:`.crypto_generichash_blake2b_init`
    :type statebuf: object
    :param data:
    :type data: bytes
    s#Input data must be a bytes sequenceRisUnexpected failureN(	RR
RRRRt!crypto_generichash_blake2b_updateRR#(R-R%R)((sB/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_generichash.pytgenerichash_blake2b_update�s

cC`sTtjdt�}tj|||�}t|dkddtj�tj||�S(s�Finalize the blake2b hash state and return the digest.

    :param statebuf:
    :type statebuf: object
    :param digest_size:
    :type digest_size: int
    :return: the blake2 digest of the passed-in data stream
    :rtype: bytes
    sunsigned char[]isUnexpected failureR(	RR RRt crypto_generichash_blake2b_finalRRR#R$(R-Rt_digestR)((sB/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_generichash.pytgenerichash_blake2b_final�s

cC`s)tjdt�}tj||t�|S(s-Return a copy of the given blake2b hash statesunsigned char[](RR R+R!(R-tnewstate((sB/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_generichash.pytgenerichash_blake2b_state_copy�sN((t
__future__RRRtsixRtnaclRRtnacl._sodiumRRtnacl.exceptionsRt crypto_generichash_blake2b_bytestcrypto_generichash_BYTESt$crypto_generichash_blake2b_bytes_mintcrypto_generichash_BYTES_MINt$crypto_generichash_blake2b_bytes_maxRt#crypto_generichash_blake2b_keybytestcrypto_generichash_KEYBYTESt'crypto_generichash_blake2b_keybytes_mintcrypto_generichash_KEYBYTES_MINt'crypto_generichash_blake2b_keybytes_maxRt$crypto_generichash_blake2b_saltbytesRt(crypto_generichash_blake2b_personalbytesRtcrypto_generichash_statebytesR+RRRR*R.R0R3R5(((sB/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_generichash.pyt<module>s0	$1-		

https://t.me/AnonymousX5 - 2025