author | Manuel Jacob <me@manueljacob.de> |
Fri, 15 May 2020 00:53:37 +0200 | |
branch | stable |
changeset 44830 | 91e509a12dbc |
parent 44059 | 7126d8b8e0e6 |
child 46785 | 521ac0d7047f |
permissions | -rw-r--r-- |
44059
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 |
from __future__ import absolute_import |
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 |
|
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
3 |
import hashlib |
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
4 |
|
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
5 |
try: |
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
6 |
from ..thirdparty import sha1dc |
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 |
|
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 |
sha1 = sha1dc.sha1 |
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 |
except (ImportError, AttributeError): |
7126d8b8e0e6
hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 |
sha1 = hashlib.sha1 |