Added a test of the md5.hexdigest() method. Funny enough, this test
had yet-another Python implementation of a binary-data-to-hex-digit encoder!
This commit is contained in:
parent
4ef4be53ac
commit
3fdcccb82f
|
@ -22,3 +22,9 @@ print md5test('message digest')
|
|||
print md5test('abcdefghijklmnopqrstuvwxyz')
|
||||
print md5test('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')
|
||||
print md5test('12345678901234567890123456789012345678901234567890123456789012345678901234567890')
|
||||
|
||||
# hexdigest is new with Python 2.0
|
||||
m = md5('testing the hexdigest method')
|
||||
h = m.hexdigest()
|
||||
if hexstr(m.digest()) <> h:
|
||||
print 'hexdigest() failed'
|
||||
|
|
Loading…
Reference in New Issue