changeset 330:8379a9bac9c0

The random input should not be the default
author Sigurd Meldgaard <stm@daimi.au.dk>
date Mon, 05 Jul 2010 15:12:42 +0200
parents c3a826ce9a0c
children 78c40a179bab
files pysmcl/functions.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/functions.py	Mon Jul 05 12:55:23 2010 +0200
+++ b/pysmcl/functions.py	Mon Jul 05 15:12:42 2010 +0200
@@ -1,7 +1,6 @@
 from twisted.internet.defer import inlineCallbacks
 import pysmcl.setup
 from random import randint
-#from viff. import 
 
 def input(runtime, prompt, player, lower, upper):
     """ Queries player for an integer in the interval between lower
@@ -10,8 +9,8 @@
         print(prompt)
         print("Please enter a number in the interval from %d to %d" %
               (lower, upper))
-    #    a = int(raw_input())
-        a = randint(lower, upper);print "chose %d for you!" % a
+        a = int(raw_input())
+    #    a = randint(lower, upper);print "chose %d for you!" % a
         if(a < lower or a >= upper):
             raise RuntimeError("Invalid value shared")
         return runtime.shamir_share([player], pysmcl.setup.Zp, a)