lib: improve probability of symbols in generated key
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
2b94e9a687
commit
0e3602d7eb
|
@ -13,6 +13,6 @@ def generate_key(length=128):
|
||||||
"""Generate a suitable client secret"""
|
"""Generate a suitable client secret"""
|
||||||
rand = SystemRandom()
|
rand = SystemRandom()
|
||||||
return "".join(
|
return "".join(
|
||||||
rand.choice(string.ascii_letters + string.digits + string.punctuation)
|
rand.choice(string.ascii_letters + string.digits + string.punctuation + string.punctuation)
|
||||||
for x in range(length)
|
for x in range(length)
|
||||||
)
|
)
|
||||||
|
|
Reference in New Issue