diff options
author | Gregory Haynes <greg@greghaynes.net> | 2015-01-03 09:19:05 -0800 |
---|---|---|
committer | Gregory Haynes <greg@greghaynes.net> | 2015-01-03 09:19:05 -0800 |
commit | 7e28fbb6ce3c193c9a0dc99504629cabc98d5fe6 (patch) | |
tree | cf3e31898a2e9c01bd8b3d08430106708570f4f3 /docs/hazmat | |
parent | e261d94c914b02ba132b13ff6c0613d026c630bc (diff) | |
download | cryptography-7e28fbb6ce3c193c9a0dc99504629cabc98d5fe6.tar.gz cryptography-7e28fbb6ce3c193c9a0dc99504629cabc98d5fe6.tar.bz2 cryptography-7e28fbb6ce3c193c9a0dc99504629cabc98d5fe6.zip |
iv should be 32 bytes
Diffstat (limited to 'docs/hazmat')
-rw-r--r-- | docs/hazmat/primitives/symmetric-encryption.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index d532ad1b..24854b1c 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(16) + >>> iv = os.urandom(32) >>> cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=backend) >>> encryptor = cipher.encryptor() >>> ct = encryptor.update(b"a secret message") + encryptor.finalize() |