mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Make reindent.py happy (convert everything to 4-space indents!).
This commit is contained in:
parent
2e6d25c5bb
commit
004d5e6880
70 changed files with 1215 additions and 1247 deletions
|
@ -4,15 +4,15 @@ import string
|
|||
from md5 import md5
|
||||
|
||||
def hexstr(s):
|
||||
h = string.hexdigits
|
||||
r = ''
|
||||
for c in s:
|
||||
i = ord(c)
|
||||
r = r + h[(i >> 4) & 0xF] + h[i & 0xF]
|
||||
return r
|
||||
h = string.hexdigits
|
||||
r = ''
|
||||
for c in s:
|
||||
i = ord(c)
|
||||
r = r + h[(i >> 4) & 0xF] + h[i & 0xF]
|
||||
return r
|
||||
|
||||
def md5test(s):
|
||||
return 'MD5 ("' + s + '") = ' + hexstr(md5(s).digest())
|
||||
return 'MD5 ("' + s + '") = ' + hexstr(md5(s).digest())
|
||||
|
||||
print 'MD5 test suite:'
|
||||
print md5test('')
|
||||
|
@ -27,4 +27,4 @@ print md5test('12345678901234567890123456789012345678901234567890123456789012345
|
|||
m = md5('testing the hexdigest method')
|
||||
h = m.hexdigest()
|
||||
if hexstr(m.digest()) <> h:
|
||||
print 'hexdigest() failed'
|
||||
print 'hexdigest() failed'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue