Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9786910 + 7f7b941 commit fc8a0a7Copy full SHA for fc8a0a7
2 files changed
Lib/crypt.py
@@ -28,7 +28,7 @@ def mksalt(method=None):
28
if method is None:
29
method = methods[0]
30
s = '${}$'.format(method.ident) if method.ident else ''
31
- s += ''.join(_sr.sample(_saltchars, method.salt_chars))
+ s += ''.join(_sr.choice(_saltchars) for char in range(method.salt_chars))
32
return s
33
34
Misc/NEWS
@@ -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
35
reduced when uppercase letters were removed from the charset used to generate
0 commit comments