diff options
author | Donald Stufft <donald@stufft.io> | 2013-08-11 14:32:17 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-08-11 14:32:17 -0400 |
commit | 292112bc875016fd08198fe72091ab32f48f515b (patch) | |
tree | c91bcaa3722d0cb07b5736593ea3618445f231dd /docs/primitives/symmetric-encryption.rst | |
parent | d424be8bf0525682b248a8cdc57aa57fe1ec01ee (diff) | |
download | cryptography-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/primitives/symmetric-encryption.rst')
-rw-r--r-- | docs/primitives/symmetric-encryption.rst | 2 |
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 [...] |