aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-10 03:19:14 +0800
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-09 17:34:17 -0600
commit0994c5628a3d960a45f8aac33f0d5d985eb48cf7 (patch)
tree6fb89885d60f6748d5f4e7d352d0c4529d0002dd /docs
parent129d61e07243a6134eefa5c5de13c52f4e900794 (diff)
downloadcryptography-0994c5628a3d960a45f8aac33f0d5d985eb48cf7.tar.gz
cryptography-0994c5628a3d960a45f8aac33f0d5d985eb48cf7.tar.bz2
cryptography-0994c5628a3d960a45f8aac33f0d5d985eb48cf7.zip
update docs to include arc4 example
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/symmetric-encryption.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst
index 9d18ce50..77e61b56 100644
--- a/docs/hazmat/primitives/symmetric-encryption.rst
+++ b/docs/hazmat/primitives/symmetric-encryption.rst
@@ -159,6 +159,17 @@ Weak Ciphers
``192``, or ``256`` bits in length. This must be kept
secret.
+ .. doctest::
+
+ >>> from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
+ >>> algorithm = algorithms.ARC4(key)
+ >>> cipher = Cipher(algorithm, mode=None)
+ >>> encryptor = cipher.encryptor()
+ >>> ct = encryptor.update(b"a secret message")
+ >>> decryptor = cipher.decryptor()
+ >>> decryptor.update(ct)
+ 'a secret message'
+
.. _symmetric-encryption-modes: