Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fc8a0a7b
Commit
fc8a0a7b
authored
Aug 14, 2013
by
Victor Stinner
Browse files
Options
Browse Files
Download
Plain Diff
(Merge 3.3) Issue #18405: Improve the entropy of crypt.mksalt().
parents
97869103
7f7b941f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
Lib/crypt.py
Lib/crypt.py
+1
-1
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/crypt.py
View file @
fc8a0a7b
...
...
@@ -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
...
...
Misc/NEWS
View file @
fc8a0a7b
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment