aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-14 08:37:41 -0800
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-14 08:37:41 -0800
commit0e9c4d187cad5650beb2bba210f9273f3e211e5c (patch)
treecffb421e7c2ac0685123a0a3d4b4d05e4b6cfaac /docs
parentca4a22b4dea8243d02bc4a2699048694e591ae75 (diff)
parentd83c5909c9de44dd523f057edffbdb33a9ae89e6 (diff)
downloadcryptography-0e9c4d187cad5650beb2bba210f9273f3e211e5c.tar.gz
cryptography-0e9c4d187cad5650beb2bba210f9273f3e211e5c.tar.bz2
cryptography-0e9c4d187cad5650beb2bba210f9273f3e211e5c.zip
Merge pull request #307 from alex/prefer-doctest
Prefer executable code examples
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/symmetric-encryption.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst
index ef6f0871..55b2dcd4 100644
--- a/docs/hazmat/primitives/symmetric-encryption.rst
+++ b/docs/hazmat/primitives/symmetric-encryption.rst
@@ -266,16 +266,18 @@ Modes
A good construction looks like:
- .. code-block:: pycon
+ .. doctest::
>>> import os
+ >>> from cryptography.hazmat.primitives.ciphers.modes import CBC
>>> iv = os.urandom(16)
>>> mode = CBC(iv)
While the following is bad and will leak information:
- .. code-block:: pycon
+ .. doctest::
+ >>> from cryptography.hazmat.primitives.ciphers.modes import CBC
>>> iv = "a" * 16
>>> mode = CBC(iv)