From 0ca7fdbd09184648939214ccdc83675b112e86c9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 07:35:26 -0700 Subject: Begin to describe the methods --- docs/primitives/symmetric-encryption.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index acb5fc17..cf92437a 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -20,3 +20,11 @@ or GCM). A simple example of encrypting content with AES is: # The ciphertext [...] +Here ``key`` is the encryption key (which must be kept secret), and ``iv`` is +the initialization vector (which should be random). Exactly what form these +values should take is described for each of the ciphers and modes. + +``encrypt()`` should be called repeatedly with additional plaintext, and it +will return the encrypted bytes, if there isn't enough data, it will buffer it +internally. ``finalize()`` should be called at the end, and will return +whatever data is left. -- cgit v1.2.3