aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-08-11 14:32:17 -0400
committerDonald Stufft <donald@stufft.io>2013-08-11 14:32:17 -0400
commit292112bc875016fd08198fe72091ab32f48f515b (patch)
treec91bcaa3722d0cb07b5736593ea3618445f231dd /docs
parentd424be8bf0525682b248a8cdc57aa57fe1ec01ee (diff)
downloadcryptography-292112bc875016fd08198fe72091ab32f48f515b.tar.gz
cryptography-292112bc875016fd08198fe72091ab32f48f515b.tar.bz2
cryptography-292112bc875016fd08198fe72091ab32f48f515b.zip
Make the example error free
Without padding b"my secret message" is not divisible by AES's block size and thus would throw an error.
Diffstat (limited to 'docs')
-rw-r--r--docs/primitives/symmetric-encryption.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst
index 0812f6b9..9986d89d 100644
--- a/docs/primitives/symmetric-encryption.rst
+++ b/docs/primitives/symmetric-encryption.rst
@@ -14,7 +14,7 @@ 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("my secret message") + cipher.finalize()
+ >>> cipher.encrypt(b"a secret message") + cipher.finalize()
# The ciphertext
[...]