viff

changeset 842:0e9ab27bf855

Parse long integers as longs. The int and long built-ins are almost identical for most Python code, except that GMPY refuses to convert mpz values to long integers using int and one must use long instead. Python 3000 will fix this by having only one integer type.
author Martin Geisler <mg@daimi.au.dk>
date Mon, 21 Jul 2008 20:14:55 +0200
parents 3f01e81fcc1a
children e0ba3202ebd2
files viff/config.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/viff/config.py	Sun Jun 29 13:59:32 2008 +0200
     1.2 +++ b/viff/config.py	Mon Jul 21 20:14:55 2008 +0200
     1.3 @@ -126,10 +126,10 @@
     1.4          id = p_unstr(player)
     1.5          host = config[player]['host']
     1.6          port = int(config[player]['port'])
     1.7 -        pubkey = tuple(map(int, config[player]['pubkey']))
     1.8 +        pubkey = tuple(map(long, config[player]['pubkey']))
     1.9  
    1.10          if 'prss_keys' in config[player]:
    1.11 -            seckey = tuple(map(int, config[player]['seckey']))
    1.12 +            seckey = tuple(map(long, config[player]['seckey']))
    1.13              keys = {}
    1.14              for subset in config[player]['prss_keys']:
    1.15                  keys[s_unstr(subset)] = config[player]['prss_keys'][subset]