summaryrefslogtreecommitdiff
path: root/Lib/crypt.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/crypt.py')
-rw-r--r--Lib/crypt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/crypt.py b/Lib/crypt.py
index b90c81cc40..49ab96e140 100644
--- a/Lib/crypt.py
+++ b/Lib/crypt.py
@@ -28,7 +28,7 @@ def mksalt(method=None):
if method is None:
method = methods[0]
s = '${}$'.format(method.ident) if method.ident else ''
- s += ''.join(_sr.sample(_saltchars, method.salt_chars))
+ s += ''.join(_sr.choice(_saltchars) for char in range(method.salt_chars))
return s