All Samples(77) | Call(59) | Derive(0) | Import(18)
Alternate random number generator using sources provided by the operating system (such as /dev/urandom on Unix or CryptGenRandom on Windows). Not available on all systems (see os.urandom() for details).
src/g/a/gajim-HEAD/src/common/connection.py gajim(Download)
import locale try: randomsource = random.SystemRandom() except Exception: randomsource = random.Random() randomsource.seed()
src/w/e/webnest-HEAD/env/lib/python2.6/site-packages/werkzeug/security.py webnest(Download)
""" import hmac import string from random import SystemRandom # because the API of hmac changed with the introduction of the # new hashlib module, we have to support both. This sets up a
SALT_CHARS = string.letters + string.digits _sys_rng = SystemRandom() def gen_salt(length):
src/p/y/PyTide-HEAD/NetworkTools/DNS/Base.py PyTide(Download)
# replace DNS.Base.random. SystemRandom uses /dev/urandom or similar source. # try: from random import SystemRandom random = SystemRandom() except: import random
src/z/a/zamboni-lib-HEAD/lib/python/werkzeug/security.py zamboni-lib(Download)
""" import hmac import string from random import SystemRandom # because the API of hmac changed with the introduction of the # new hashlib module, we have to support both. This sets up a
SALT_CHARS = string.letters + string.digits _sys_rng = SystemRandom() def gen_salt(length):
src/l/s/lsdsimulatorinp-HEAD/inputGui/src/frame/FileGenerator.py lsdsimulatorinp(Download)
from PyQt4 import QtGui, QtCore
from util.opener import Opener
from random import randint
from random import SystemRandom
class FileGenerator(QtGui.QDialog):
'''
#Generator pseudo-random numbers for seeds
fileNumber = 0
tmpTextStream = QtCore.QTextStream()
randomGenerator = SystemRandom()
if self.comboBoxBits.currentIndex() == 0:
bitLength = 32
maxLong = 4294967295
src/p/y/pycopia-HEAD/core/pycopia/sysrandom.py pycopia(Download)
source by default. """ from random import SystemRandom _inst = SystemRandom()
src/p/y/pythonedinburgh-HEAD/werkzeug/security.py pythonedinburgh(Download)
""" import hmac import string from random import SystemRandom # because the API of hmac changed with the introduction of the # new hashlib module, we have to support both. This sets up a
SALT_CHARS = string.letters + string.digits _sys_rng = SystemRandom() def gen_salt(length):
src/v/i/vic-HEAD/trunk/OpenPlans/opencore/opencore/auth/SignedCookieAuthHelper.py vic(Download)
#this may throw an error if the file cannot be created, but that's OK, because
#then users will know to create it themselves
f = open(secret_file_name, "w")
from random import SystemRandom
random = SystemRandom()
letters = [chr(ord('A') + i) for i in xrange(26)]
letters += [chr(ord('a') + i) for i in xrange(26)]
src/v/i/vic-HEAD/OpenPlans/opencore/opencore/auth/SignedCookieAuthHelper.py vic(Download)
#this may throw an error if the file cannot be created, but that's OK, because
#then users will know to create it themselves
f = open(secret_file_name, "w")
from random import SystemRandom
random = SystemRandom()
letters = [chr(ord('A') + i) for i in xrange(26)]
letters += [chr(ord('a') + i) for i in xrange(26)]
src/p/y/pydns-2.3.4/DNS/Base.py pydns(Download)
# replace DNS.Base.random. SystemRandom uses /dev/urandom or similar source. # try: from random import SystemRandom random = SystemRandom() except: import random
1 | 2 | 3 | 4 | 5 | 6 | 7 Next