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
88768483
Commit
88768483
authored
Nov 13, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
135cce87
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
8 deletions
+6
-8
Lib/hmac.py
Lib/hmac.py
+1
-2
Lib/pprint.py
Lib/pprint.py
+1
-1
Lib/test/test_dumbdbm.py
Lib/test/test_dumbdbm.py
+2
-2
Lib/test/test_hmac.py
Lib/test/test_hmac.py
+1
-2
Lib/test/test_pep247.py
Lib/test/test_pep247.py
+1
-1
No files found.
Lib/hmac.py
View file @
88768483
...
...
@@ -35,7 +35,7 @@ class HMAC:
self
.
outer
=
digestmod
.
new
()
self
.
inner
=
digestmod
.
new
()
self
.
digest_size
=
digestmod
.
digest_size
blocksize
=
64
ipad
=
"
\
x36
"
*
blocksize
opad
=
"
\
x5C
"
*
blocksize
...
...
@@ -97,4 +97,3 @@ def new(key, msg = None, digestmod = None):
method.
"""
return
HMAC
(
key
,
msg
,
digestmod
)
Lib/pprint.py
View file @
88768483
...
...
@@ -283,7 +283,7 @@ def _safe_repr(object, context, maxlevels, level):
recursive
=
1
del
context
[
objid
]
return
format
%
_commajoin
(
components
),
readable
,
recursive
rep
=
`object`
return
rep
,
(
rep
and
not
rep
.
startswith
(
'<'
)),
0
...
...
Lib/test/test_dumbdbm.py
View file @
88768483
...
...
@@ -24,7 +24,7 @@ class DumbDBMTestCase(unittest.TestCase):
unittest
.
TestCase
.
__init__
(
self
,
*
args
)
self
.
_dkeys
=
self
.
_dict
.
keys
()
self
.
_dkeys
.
sort
()
def
test_dumbdbm_creation
(
self
):
for
ext
in
[
".dir"
,
".dat"
,
".bak"
]:
try
:
os
.
unlink
(
self
.
_fname
+
ext
)
...
...
@@ -57,7 +57,7 @@ class DumbDBMTestCase(unittest.TestCase):
keys
=
self
.
keys_helper
(
f
)
for
key
in
self
.
_dict
:
self
.
assertEqual
(
self
.
_dict
[
key
],
f
[
key
])
def
keys_helper
(
self
,
f
):
keys
=
f
.
keys
()
keys
.
sort
()
...
...
Lib/test/test_hmac.py
View file @
88768483
...
...
@@ -45,7 +45,7 @@ class ConstructorTestCase(unittest.TestCase):
h
=
hmac
.
HMAC
(
"key"
,
""
,
sha
)
except
:
self
.
fail
(
"Constructor call with sha module raised exception."
)
class
SanityTestCase
(
unittest
.
TestCase
):
def
test_default_is_md5
(
self
):
"""Testing if HMAC defaults to MD5 algorithm."""
...
...
@@ -106,4 +106,3 @@ def test_main():
if
__name__
==
"__main__"
:
test_main
()
Lib/test/test_pep247.py
View file @
88768483
#
# Test suite to check compliance with PEP 247, the standard API for
# hashing algorithms.
# hashing algorithms.
#
import
md5
,
sha
,
hmac
...
...
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