diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-05-12 15:17:06 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-05-12 15:17:06 -0400 |
commit | 056c9ddc412fb23b81d3192f9f4e2403982ef09a (patch) | |
tree | e28eee7ddfe607788cd70a10db7d84735841ec3f /docs/hazmat/primitives/symmetric-encryption.rst | |
parent | 590692fe6a071b3c694ae8966b84b45ece9b1a07 (diff) | |
download | cryptography-056c9ddc412fb23b81d3192f9f4e2403982ef09a.tar.gz cryptography-056c9ddc412fb23b81d3192f9f4e2403982ef09a.tar.bz2 cryptography-056c9ddc412fb23b81d3192f9f4e2403982ef09a.zip |
switch to py3 on docs job (#4230)
* switch to py3 on docs job
* somehow unicode isn't a word
Diffstat (limited to 'docs/hazmat/primitives/symmetric-encryption.rst')
-rw-r--r-- | docs/hazmat/primitives/symmetric-encryption.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index 126a9184..593b880b 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -42,7 +42,7 @@ it fits your needs before implementing anything using this module.** >>> ct = encryptor.update(b"a secret message") + encryptor.finalize() >>> decryptor = cipher.decryptor() >>> decryptor.update(ct) + decryptor.finalize() - 'a secret message' + b'a secret message' :param algorithms: A :class:`~cryptography.hazmat.primitives.ciphers.CipherAlgorithm` @@ -151,7 +151,7 @@ Algorithms >>> ct = encryptor.update(b"a secret message") >>> decryptor = cipher.decryptor() >>> decryptor.update(ct) - 'a secret message' + b'a secret message' .. class:: TripleDES(key) @@ -229,7 +229,7 @@ Weak ciphers >>> ct = encryptor.update(b"a secret message") >>> decryptor = cipher.decryptor() >>> decryptor.update(ct) - 'a secret message' + b'a secret message' .. class:: IDEA(key) @@ -278,7 +278,7 @@ Modes .. doctest:: >>> from cryptography.hazmat.primitives.ciphers.modes import CBC - >>> iv = "a" * 16 + >>> iv = b"a" * 16 >>> mode = CBC(iv) @@ -471,7 +471,7 @@ Modes .. testoutput:: - a secret message! + b'a secret message!' .. class:: XTS(tweak) @@ -594,7 +594,7 @@ Interfaces >>> len_decrypted = decryptor.update_into(ct, buf) >>> # get the plaintext from the buffer reading only the bytes written (len_decrypted) >>> bytes(buf[:len_decrypted]) + decryptor.finalize() - 'a secret message' + b'a secret message' .. method:: finalize() |