Commit fc8a0a7b authored by Victor Stinner's avatar Victor Stinner

(Merge 3.3) Issue #18405: Improve the entropy of crypt.mksalt().

parents 97869103 7f7b941f
......@@ -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
......
......@@ -28,6 +28,8 @@ Core and Builtins
Library
-------
- Issue #18405: Improve the entropy of crypt.mksalt().
- Issue #12015: The tempfile module now uses a suffix of 8 random characters
instead of 6, to reduce the risk of filename collision. The entropy was
reduced when uppercase letters were removed from the charset used to generate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment