viff

changeset 1003:4c341ec05420

Renamed SEED to VIFF_SEED.
author Martin Geisler <mg@daimi.au.dk>
date Fri, 24 Oct 2008 13:00:29 +0200
parents 735d5e3dade2
children 26d6cdcbd677
files NEWS viff/util.py
diffstat 2 files changed, 12 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/NEWS	Wed Oct 15 09:44:48 2008 +0200
     1.2 +++ b/NEWS	Fri Oct 24 13:00:29 2008 +0200
     1.3 @@ -12,6 +12,11 @@
     1.4  
     1.5    http://tracker.viff.dk/
     1.6  
     1.7 +Next version, not yet released
     1.8 +------------------------------
     1.9 +
    1.10 +* Renamed random seed environment variable from SEED to VIFF_SEED.
    1.11 +
    1.12  
    1.13  Version 0.7.1, released on 2008-10-09
    1.14  -------------------------------------
     2.1 --- a/viff/util.py	Wed Oct 15 09:44:48 2008 +0200
     2.2 +++ b/viff/util.py	Fri Oct 24 13:00:29 2008 +0200
     2.3 @@ -32,7 +32,7 @@
     2.4  from gmpy import mpz
     2.5  
     2.6  #: Seed for :data:`rand`.
     2.7 -_seed = os.environ.get('SEED')
     2.8 +_seed = os.environ.get('VIFF_SEED')
     2.9  
    2.10  if _seed is None:
    2.11      # If the environment variable is not set, then a random seed is
    2.12 @@ -42,14 +42,14 @@
    2.13      #: Random number generator used by all VIFF code.
    2.14      #:
    2.15      #: The generator is by default initialized with a random seed,
    2.16 -    #: unless the environment variable :envvar:`SEED` is set to a value, in
    2.17 -    #: which case that value is used instead. If :envvar:`SEED` is defined,
    2.18 -    #: but empty, then no seed is used and a protocol cannot be
    2.19 -    #: reproduced exactly.
    2.20 +    #: unless the environment variable :envvar:`VIFF_SEED` is set to a
    2.21 +    #: value, in which case that value is used instead. If
    2.22 +    #: :envvar:`VIFF_SEED` is defined, but empty, then no seed is used
    2.23 +    #: and a protocol cannot be reproduced exactly.
    2.24      rand = random.Random(_seed)
    2.25  elif _seed == '':
    2.26 -    # If it is set, but set to the empty string (SEED=), then no seed
    2.27 -    # is used.
    2.28 +    # If it is set, but set to the empty string (VIFF_SEED=), then no
    2.29 +    # seed is used.
    2.30      rand = random.SystemRandom()
    2.31  else:
    2.32      # Otherwise use the seed given, which must be an integer.