Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
contego / home / tvault / .virtenv / lib / python2.7 / site-packages / nacl / bindings / crypto_secretbox.pyc
Size: Mime:
ó
ۍEYc@`s˜ddlmZmZmZddlmZddlmZm	Z	ddl
mZe	jƒZ
e	jƒZe	jƒZe	jƒZd„Zd„ZdS(i(tabsolute_importtdivisiontprint_function(t
exceptions(tffitlib(tensurecC`sËt|ƒtkr$tjdƒ‚nt|ƒtkrHtjdƒ‚ndt|}tjdt|ƒƒ}tj	||t|ƒ||ƒ}t
|dkddtjƒtj|t|ƒƒ}|t
S(sÆ
    Encrypts and returns the message ``message`` with the secret ``key`` and
    the nonce ``nonce``.

    :param message: bytes
    :param nonce: bytes
    :param key: bytes
    :rtype: bytes
    sInvalid keys
Invalid noncetsunsigned char[]isEncryption failedtraising(tlentcrypto_secretbox_KEYBYTEStexct
ValueErrortcrypto_secretbox_NONCEBYTEStcrypto_secretbox_ZEROBYTESRtnewRtcrypto_secretboxRtCryptoErrortbuffertcrypto_secretbox_BOXZEROBYTES(tmessagetnoncetkeytpaddedt
ciphertexttres((sS/home/tvault/.virtenv/lib/python2.7/site-packages/nacl/bindings/crypto_secretbox.pyRs
!cC`sËt|ƒtkr$tjdƒ‚nt|ƒtkrHtjdƒ‚ndt|}tjdt|ƒƒ}tj	||t|ƒ||ƒ}t
|dkddtjƒtj|t|ƒƒ}|t
S(sÕ
    Decrypt and returns the encrypted message ``ciphertext`` with the secret
    ``key`` and the nonce ``nonce``.

    :param ciphertext: bytes
    :param nonce: bytes
    :param key: bytes
    :rtype: bytes
    sInvalid keys
Invalid nonceRsunsigned char[]is1Decryption failed. Ciphertext failed verificationR(R	R
RRR
RRRRtcrypto_secretbox_openRRRR(RRRRt	plaintextR((sS/home/tvault/.virtenv/lib/python2.7/site-packages/nacl/bindings/crypto_secretbox.pyR6s

N(t
__future__RRRtnaclRRtnacl._sodiumRRtnacl.exceptionsRtcrypto_secretbox_keybytesR
tcrypto_secretbox_noncebytesR
tcrypto_secretbox_zerobytesRtcrypto_secretbox_boxzerobytesRRR(((sS/home/tvault/.virtenv/lib/python2.7/site-packages/nacl/bindings/crypto_secretbox.pyt<module>s