aboutsummaryrefslogtreecommitdiffstats
path: root/docs/primitives
diff options
context:
space:
mode:
Diffstat (limited to 'docs/primitives')
-rw-r--r--docs/primitives/symmetric-encryption.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst
index 7899e67d..4f404789 100644
--- a/docs/primitives/symmetric-encryption.rst
+++ b/docs/primitives/symmetric-encryption.rst
@@ -21,7 +21,8 @@ where the encrypter and decrypter both use the same key.
>>> from cryptography.primitives.block import BlockCipher, ciphers, modes
>>> cipher = BlockCipher(ciphers.AES(key), modes.CBC(iv))
- >>> cipher.encrypt(b"a secret message") + cipher.finalize()
+ >>> context = cipher.encryptor()
+ >>> context.update(b"a secret message") + context.finalize()
'...'
:param cipher: One of the ciphers described below.