diff options
Diffstat (limited to 'alphanum/alphanum.py')
| -rw-r--r-- | alphanum/alphanum.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alphanum/alphanum.py b/alphanum/alphanum.py index 6fc2f03..3272f6c 100644 --- a/alphanum/alphanum.py +++ b/alphanum/alphanum.py @@ -1,5 +1,7 @@ -from random import choices +import random + +POP = 'abcdefghijklmnopqrstuvwxyz0123456789' def generate(length=1) -> str: - return ''.join(choices('abcdefghijklmnopqrstuvwxyz0123456789', k=length)) + return ''.join(random.SystemRandom().choices(POP, k=length)) |
