/rev/49c14731cf5e
changeset: 1208:49c14731cf5e
user:      Marcel Keller <[email protected]>
date:      Thu Sep 10 16:20:06 2009 +0200
summary:   Added option to use ActiveRuntime.

diffstat:

 apps/aes.py |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 2eb256e7e36c -r 49c14731cf5e apps/aes.py
--- a/apps/aes.py       Wed Sep 09 11:24:10 2009 +0200
+++ b/apps/aes.py       Thu Sep 10 16:20:06 2009 +0200
@@ -55,6 +55,8 @@
 parser.add_option("-c", "--count", action="store", type="int",
                   help="Number of blocks to encrypt. Defaults to 1.")
 parser.set_defaults(count=1)
+parser.add_option("-a", "--active", action="store_true", help="Use actively "
+                  "secure runtime. Default is only passive security.")
 
 # Add standard VIFF options.
 Runtime.add_options(parser)
@@ -101,7 +103,14 @@
     s = rt.synchronize()
     rt.schedule_complex_callback(s, encrypt, rt, key)
 
-rt = create_runtime(id, players, 1, options)
+if options.active:
+    from viff.active import ActiveRuntime
+    runtime_class = ActiveRuntime
+else:
+    from viff.passive import PassiveRuntime
+    runtime_class = PassiveRuntime
+
+rt = create_runtime(id, players, 1, options, runtime_class)
 rt.addCallback(share_key)
 
 reactor.run()
_______________________________________________
viff-commits mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-commits-viff.dk

Reply via email to