Will python SystemRandom / os.urandom always have enough entropy for good crypto

前端 未结 3 1329
走了就别回头了
走了就别回头了 2020-12-25 13:12

I have a password generator:

import random, string

def gen_pass():
    foo = random.SystemRandom()
    length = 64
    chars = string.letters + string.digit         


        
3条回答
  •  悲哀的现实
    2020-12-25 14:03

    You might want to read this about why /dev/urandom is the way to go:

    http://www.2uo.de/myths-about-urandom/

提交回复
热议问题