# HG changeset patch # User Sigurd Meldgaard # Date 1278335562 -7200 # Node ID 8379a9bac9c008bb609460a738ae2c292bbe8333 # Parent c3a826ce9a0c712f9f52955bdf01151c9fbdf35c The random input should not be the default diff -r c3a826ce9a0c -r 8379a9bac9c0 pysmcl/functions.py --- 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)