changeset 1098:54a68af0a945

Fixed code example mistakenly marked as a doctest.
author Martin Geisler <mg@daimi.au.dk>
date Wed, 04 Feb 2009 23:06:07 +0100
parents 50056a810951
children cc706ddd9376
files viff/aes.py
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/viff/aes.py	Fri Jan 30 14:50:47 2009 +0100
+++ b/viff/aes.py	Wed Feb 04 23:06:07 2009 +0100
@@ -58,14 +58,17 @@
 
 
 class AES:
-    """AES instantiation:
+    """AES instantiation.
 
-    >>> aes = AES(runtime, 192)
-    >>> cleartext = [Share(runtime, GF256, GF256(0)) for i in range(128/8)]
-    >>> key = [runtime.prss_share_random(GF256) for i in range(192/8)]
-    >>> ciphertext = aes.encrypt("abcdefghijklmnop", key)
-    >>> ciphertext = aes.encrypt(cleartext, "keykeykeykeykeykeykeykey")
-    >>> ciphertext = aes.encrypt(cleartext, key)
+    This class is used together with a :class:`viff.runtime.Runtime`
+    object::
+
+        aes = AES(runtime, 192)
+        cleartext = [Share(runtime, GF256, GF256(0)) for i in range(128/8)]
+        key = [runtime.prss_share_random(GF256) for i in range(192/8)]
+        ciphertext = aes.encrypt("abcdefghijklmnop", key)
+        ciphertext = aes.encrypt(cleartext, "keykeykeykeykeykeykeykey")
+        ciphertext = aes.encrypt(cleartext, key)
 
     In every case *ciphertext* will be a list of shares over GF256.
     """