Mercurial > pysmcl
changeset 248:3f35fc6e5951
functions: renaming and cleanup
author | Sigurd Meldgaard <stm@daimi.au.dk> |
---|---|
date | Wed, 06 Jan 2010 12:19:04 +0100 |
parents | 26f0f4a81ef4 |
children | a210979cbd5d |
files | pysmcl/functions.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pysmcl/functions.py Wed Jan 06 12:18:32 2010 +0100 +++ b/pysmcl/functions.py Wed Jan 06 12:19:04 2010 +0100 @@ -1,6 +1,6 @@ from twisted.internet.defer import inlineCallbacks import pysmcl.setup -import random +from random import randint #from viff. import def input(runtime, prompt, player, lower, upper): @@ -11,7 +11,7 @@ print("Please enter a number in the interval from %d to %d" % (lower, upper)) # a = int(raw_input()) - a = random.randint(lower, upper);print "chose %d for you!" % a + 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)