##// END OF EJS Templates
hgext: replace references to hashlib.sha1 with hashutil.sha1...
hgext: replace references to hashlib.sha1 with hashutil.sha1 When in a non-pure build of Mercurial, this will provide protections against SHA1 collision attacks. Differential Revision: https://phab.mercurial-scm.org/D7851

File last commit:

r44511:0803f803 default
r44514:006e7821 default
Show More
hashutil.py
9 lines | 190 B | text/x-python | PythonLexer
from __future__ import absolute_import
import hashlib
try:
from mercurial.thirdparty import sha1dc
sha1 = sha1dc.sha1
except (ImportError, AttributeError):
sha1 = hashlib.sha1