1 |
commit: 804bd357327e71bacef69b51ed9abbeb9a2c95a7 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 28 07:57:41 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 28 22:07:09 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=804bd357 |
7 |
|
8 |
checksum: Add summary on top to help following the logic |
9 |
|
10 |
Add a summary of all supported digest algorithms on top of the file |
11 |
along with the supported implementations and their order of preference. |
12 |
This will help people follow the crazy logic below. |
13 |
|
14 |
pym/portage/checksum.py | 15 ++++++++++++++- |
15 |
1 file changed, 14 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py |
18 |
index cdf467003..319252315 100644 |
19 |
--- a/pym/portage/checksum.py |
20 |
+++ b/pym/portage/checksum.py |
21 |
@@ -1,5 +1,5 @@ |
22 |
# checksum.py -- core Portage functionality |
23 |
-# Copyright 1998-2014 Gentoo Foundation |
24 |
+# Copyright 1998-2017 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
import portage |
28 |
@@ -13,6 +13,19 @@ import stat |
29 |
import subprocess |
30 |
import tempfile |
31 |
|
32 |
+ |
33 |
+# Summary of all available hashes and their implementations, |
34 |
+# most preferred first. Please keep this in sync with logic below. |
35 |
+# ================================================================ |
36 |
+# |
37 |
+# MD5: python-fchksum, hashlib, mhash, hashlib/md5 |
38 |
+# SHA1: hashlib, mhash, hashlib/sha1 |
39 |
+# SHA256: hashlib, pycrypto, mhash |
40 |
+# SHA512: hashlib, mhash |
41 |
+# RMD160: hashlib, pycrypto, mhash |
42 |
+# WHIRLPOOL: hashlib, mhash, bundled |
43 |
+ |
44 |
+ |
45 |
#dict of all available hash functions |
46 |
hashfunc_map = {} |
47 |
hashorigin_map = {} |