aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/symmetric-encryption.rst
diff options
context:
space:
mode:
authorGregory Haynes <greg@greghaynes.net>2015-01-03 21:58:25 -0800
committerGregory Haynes <greg@greghaynes.net>2015-01-03 21:58:25 -0800
commite5917781674c3678589571621c9b18153d2140b5 (patch)
treec480f2e8b807dcd19243e8d834ec107a53e2757d /docs/hazmat/primitives/symmetric-encryption.rst
parent7e28fbb6ce3c193c9a0dc99504629cabc98d5fe6 (diff)
downloadcryptography-e5917781674c3678589571621c9b18153d2140b5.tar.gz
cryptography-e5917781674c3678589571621c9b18153d2140b5.tar.bz2
cryptography-e5917781674c3678589571621c9b18153d2140b5.zip
IV should be 16 bytes
Diffstat (limited to 'docs/hazmat/primitives/symmetric-encryption.rst')
-rw-r--r--docs/hazmat/primitives/symmetric-encryption.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst
index 24854b1c..d532ad1b 100644
--- a/docs/hazmat/primitives/symmetric-encryption.rst
+++ b/docs/hazmat/primitives/symmetric-encryption.rst
@@ -34,7 +34,7 @@ in an "encrypt-then-MAC" formulation as `described by Colin Percival`_.
>>> from cryptography.hazmat.backends import default_backend
>>> backend = default_backend()
>>> key = os.urandom(32)
- >>> iv = os.urandom(32)
+ >>> iv = os.urandom(16)
>>> cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=backend)
>>> encryptor = cipher.encryptor()
>>> ct = encryptor.update(b"a secret message") + encryptor.finalize()