%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/
Upload File :
Create Path :
Current File : //proc/self/root/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyo

�
�֫[c@`sddlmZmZmZddlmZddlmZm	Z	ddl
mZddgZe	j
�Ze	j�Ze	j�Ze	j�Ze	j�Ze	j�Ze	j�Ze	j�Zd�Zd�Zd	�Zd
�Z d�Z!d�Z"d
�Z#d�Z$d�Z%dS(i(tabsolute_importtdivisiontprint_function(t
exceptions(tffitlib(tensuretcrypto_box_keypairt
crypto_boxcC`svtjdt�}tjdt�}tj||�}t|dkddtj�tj	|t�tj	|t�fS(Nsunsigned char[]isUnexpected library errortraising(
Rtnewtcrypto_box_PUBLICKEYBYTEStcrypto_box_SECRETKEYBYTESRRRtexctRuntimeErrortbuffer(tpktsktrc((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR#s
cC`s�tt|t�ddt�t|�tkr@tjd��ntj	dt
�}tj	dt�}tj
|||�}t|dkddtj�tj|t
�tj|t�fS(Nsseed must be bytesR	sInvalid seedsunsigned char[]isUnexpected library error(Rt
isinstancetbytest	TypeErrortlentcrypto_box_SEEDBYTESR
t
ValueErrorRR
RRRtcrypto_box_seed_keypairRR(tseedRRR((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR7s
cC`s�t|�tkr$tjd��nt|�tkrHtjd��nt|�tkrltjd��ndt|}tjdt|��}t	j
||t|�|||�}t|dkddtj�tj
|t|��tS(	NsInvalid nonce sizesInvalid public keysInvalid secret keyssunsigned char[]isUnexpected library errorR	(Rtcrypto_box_NONCEBYTESR
RRRtcrypto_box_ZEROBYTESRR
RRRRRtcrypto_box_BOXZEROBYTES(tmessagetnonceRRtpaddedt
ciphertextR((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR]s$
cC`s�t|�tkr$tjd��nt|�tkrHtjd��nt|�tkrltjd��ndt|}tjdt|��}t	j
||t|�|||�}t|dkddtj�tj
|t|��tS(	NsInvalid nonce sizesInvalid public keysInvalid secret keyssunsigned char[]is/An error occurred trying to decrypt the messageR	(RRR
RRRRRR
Rtcrypto_box_openRtCryptoErrorRR(R!RRRR t	plaintexttres((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR"|s$
cC`s�t|�tkr$tjd��nt|�tkrHtjd��ntjdt�}tj	|||�}t
|dkddtj�tj|t�S(NsInvalid public keysInvalid secret keysunsigned char[]isUnexpected library errorR	(
RRR
RRRR
tcrypto_box_BEFORENMBYTESRtcrypto_box_beforenmRRR(RRtkR((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR'�s

cC`s�t|�tkr$tjd��nt|�tkrHtjd��ndt|}tjdt|��}tj	||t|�||�}t
|dkddtj�tj|t|��t
S(Ns
Invalid noncesInvalid shared keyssunsigned char[]isUnexpected library errorR	(RRR
RR&RRR
Rtcrypto_box_afternmRRRR(RRR(R R!R((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR)�s
!
cC`s�t|�tkr$tjd��nt|�tkrHtjd��ndt|}tjdt|��}tj	||t|�||�}t
|dkddtj�tj|t|��t
S(Ns
Invalid noncesInvalid shared keyssunsigned char[]is/An error occurred trying to decrypt the messageR	(RRR
RR&RRR
Rtcrypto_box_open_afternmRR#RR(R!RR(R R$R%((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR*�s

cC`s�tt|t�ddt�tt|t�ddt�t|�tkr\tjd��nt|�}t|}t	j
d|�}tj||||�}t|dkddtj
�t	j||�S(Nsinput message must be bytesR	spublic key must be bytessInvalid public keysunsigned char[]isUnexpected library error(RRRRRRR
Rtcrypto_box_SEALBYTESRR
Rtcrypto_box_sealRR(RRt_mlent_clenR!R((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR,�s 

cC`stt|t�ddt�tt|t�ddt�tt|t�ddt�t|�tkrxtjd��nt|�tkr�tjd��nt|�}|t	}t
jd|�}tj
|||||�}t|dkd	dtj�t
j||�S(
Nsinput ciphertext must be bytesR	spublic key must be bytesssecret key must be bytessInvalid public keysInvalid secret keysunsigned char[]is/An error occurred trying to decrypt the message(RRRRRRR
RRR+RR
Rtcrypto_box_seal_openR#R(R!RRR.R-R$R%((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyR/s(

N(&t
__future__RRRtnaclRR
tnacl._sodiumRRtnacl.exceptionsRt__all__tcrypto_box_secretkeybytesRtcrypto_box_publickeybytesRtcrypto_box_seedbytesRtcrypto_box_noncebytesRtcrypto_box_zerobytesRtcrypto_box_boxzerobytesRtcrypto_box_beforenmbytesR&tcrypto_box_sealbytesR+RRRR"R'R)R*R,R/(((sO/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/bindings/crypto_box.pyt<module>s*		&						&

Zerion Mini Shell 1.0