mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
remove secrets module for generating passwords until this works with python 3.6
This commit is contained in:
parent
4a2df4d979
commit
c2c91b9f37
1 changed files with 5 additions and 6 deletions
|
@ -1,8 +1,7 @@
|
|||
import secrets
|
||||
import string
|
||||
import random
|
||||
|
||||
|
||||
def gen_password(
|
||||
length,
|
||||
charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*"
|
||||
):
|
||||
return "".join([secrets.choice(charset) for _ in range(0, length)])
|
||||
def gen_password(length, charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*"):
|
||||
# use secrets module once this works in python 3.6
|
||||
return ''.join(random.choice(charset) for x in range(length))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue