X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=blobdiff_plain;f=utils%2F__init__.py;h=d6ff895082a0a9f11582aa159883df210663340d;hp=f6e64f2bde828014a1d0c44fe8bf05750768612d;hb=0a87244319dde815c9a48bc13675272521dcfe12;hpb=f56d98019b70f6b3483f40b17bc9811c9767f0f5 diff --git a/utils/__init__.py b/utils/__init__.py index f6e64f2..d6ff895 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -198,8 +198,8 @@ def DecodeBase58Check(psz): ########### end pywallet functions ####################### def random_string(length): - return ''.join(random.choice(string.ascii_uppercase + string.digits) for x in xrange(length)) - + with open("/dev/urandom", 'rb') as f: + return b58encode( f.read(length) ) def timestr(): return time.strftime("[%d/%m/%Y-%H:%M:%S]")