aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-08-08 15:30:56 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-08-08 15:30:56 -0700
commit51758ff8f09a054af9300ce96c6ec119ff92df4d (patch)
tree2b289be9a439683b1380a27a64f0e82f9213e443 /docs
parentc2ae2be66ccbdb5ddb9c103ea922679f5b4a7925 (diff)
downloadcryptography-51758ff8f09a054af9300ce96c6ec119ff92df4d.tar.gz
cryptography-51758ff8f09a054af9300ce96c6ec119ff92df4d.tar.bz2
cryptography-51758ff8f09a054af9300ce96c6ec119ff92df4d.zip
A padding example
Diffstat (limited to 'docs')
-rw-r--r--docs/primitives/symmetric-encryption.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst
index 08724a01..779f087a 100644
--- a/docs/primitives/symmetric-encryption.rst
+++ b/docs/primitives/symmetric-encryption.rst
@@ -12,8 +12,8 @@ where the encrypter and decrypter both use the same key.
.. code-block:: pycon
- >>> from cryptography.primitives.block import BlockCipher, cipher, mode
- >>> cipher = BlockCipher(cipher.AES(key), mode.CBC(iv))
+ >>> from cryptography.primitives.block import BlockCipher, cipher, mode, padding
+ >>> cipher = BlockCipher(cipher.AES(key), mode.CBC(iv, padding.PKCS7()))
>>> cipher.encrypt("my secret message") + cipher.finalize()
# The ciphertext
[...]
@@ -65,3 +65,5 @@ Modes
Paddings
~~~~~~~~
+
+.. class:: cryptography.primitives.block.padding.PKCS7()