From 7e28fbb6ce3c193c9a0dc99504629cabc98d5fe6 Mon Sep 17 00:00:00 2001 From: Gregory Haynes Date: Sat, 3 Jan 2015 09:19:05 -0800 Subject: iv should be 32 bytes --- docs/hazmat/primitives/symmetric-encryption.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat/primitives') 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() -- cgit v1.2.3