High quality, simple random password generator

前端 未结 27 2469
渐次进展
渐次进展 2020-12-22 17:06

I\'m interested in creating a very simple, high (cryptographic) quality random password generator. Is there a better way to do this?

import os, random, strin         


        
27条回答
  •  自闭症患者
    2020-12-22 17:16

    Base64 let us encode binary data in a human readable/writable mode with no data loss.

    import os
    random_bytes=os.urandom(12)
    secret=random_bytes.encode("base64")
    

提交回复
热议问题