Ticket #8647: hashcompat.py.diff
File hashcompat.py.diff, 478 bytes (added by , 16 years ago) |
---|
-
.py
old new 9 9 import hashlib 10 10 md5_constructor = hashlib.md5 11 11 sha_constructor = hashlib.sha1 12 sha256_constructor = hashlib.sha256 12 13 except ImportError: 13 14 import md5 14 15 md5_constructor = md5.new 15 16 import sha 16 17 sha_constructor = sha.new 18 sha256_constructor = sha.new