aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-08-08 15:23:11 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-08-08 15:23:11 -0700
commite62aa40353e34dcbccd55cc8bf62e6453ca203c4 (patch)
treeef2360216d5d9a95e3fa67a52d2829f61e4e0715 /docs
parent65678d05febd580daf00b520dbf7ce943f47bb66 (diff)
downloadcryptography-e62aa40353e34dcbccd55cc8bf62e6453ca203c4.tar.gz
cryptography-e62aa40353e34dcbccd55cc8bf62e6453ca203c4.tar.bz2
cryptography-e62aa40353e34dcbccd55cc8bf62e6453ca203c4.zip
Describe the methods more explicitly
Diffstat (limited to 'docs')
-rw-r--r--docs/primitives/symmetric-encryption.rst19
1 files changed, 11 insertions, 8 deletions
diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst
index d056290e..7b67bee0 100644
--- a/docs/primitives/symmetric-encryption.rst
+++ b/docs/primitives/symmetric-encryption.rst
@@ -18,14 +18,17 @@ where the encrypter and decrypter both use the same key.
# The ciphertext
[...]
- Here ``key`` is the encryption key (which must be kept secret), and ``iv``
- is the initialization vector (which must 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.
+ :param cipher: One of the ciphers described below.
+ :param mode: One of the modes described below.
+
+ .. method:: encrypt(plaintext)
+
+ :param bytes plaintext: The text you wish to encrypt.
+ :return bytes: Returns the ciphertext that was added.
+
+ .. method:: finalize()
+
+ :return bytes: Returns the remainder of the ciphertext.
Ciphers
~~~~~~~