%PDF- %PDF-
| Direktori : /proc/thread-self/root/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/ |
| Current File : //proc/thread-self/root/opt/plesk/python/2.7/lib64/python2.7/site-packages/nacl/secret.pyc |
�
�֫[c @` s� d d l m Z m Z m Z d d l Z d d l m Z d d l m Z d d l m
Z
m Z m Z d e j
e e f d � � YZ d S( i ( t absolute_importt divisiont print_functionN( t encoding( t
exceptions( t EncryptedMessaget StringFixert randomt SecretBoxc B` sz e Z d Z e j j Z e j j Z e j j Z
e j j Z e
j d � Z d � Z d e
j d � Z d e
j d � Z RS( s5
The SecretBox class encrypts and decrypts messages using the given secret
key.
The ciphertexts generated by :class:`~nacl.secret.Secretbox` include a 16
byte authenticator which is checked as part of the decryption. An invalid
authenticator will cause the decrypt function to raise an exception. The
authenticator is not a signature. Once you've decrypted the message you've
demonstrated the ability to create arbitrary valid message, so messages you
send are repudiable. For non-repudiable messages, sign them after
encryption.
:param key: The secret key used to encrypt and decrypt messages
:param encoder: The encoder class used to decode the given key
:cvar KEY_SIZE: The size that the key is required to be.
:cvar NONCE_SIZE: The size that the nonce is required to be.
:cvar MACBYTES: The size of the authentication MAC tag in bytes.
:cvar MESSAGEBYTES_MAX: The maximum size of a message which can be
safely encrypted with a single key/nonce
pair.
c C` sk | j | � } t | t � s0 t j d � � n t | � | j k r^ t j d | j � � n | | _ d S( Ns'