1 |
Add a summary of all supported digest algorithms on top of the file |
2 |
along with the supported implementations and their order of preference. |
3 |
This will help people follow the crazy logic below. |
4 |
--- |
5 |
pym/portage/checksum.py | 15 ++++++++++++++- |
6 |
1 file changed, 14 insertions(+), 1 deletion(-) |
7 |
|
8 |
diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py |
9 |
index cdf467003..319252315 100644 |
10 |
--- a/pym/portage/checksum.py |
11 |
+++ b/pym/portage/checksum.py |
12 |
@@ -1,5 +1,5 @@ |
13 |
# checksum.py -- core Portage functionality |
14 |
-# Copyright 1998-2014 Gentoo Foundation |
15 |
+# Copyright 1998-2017 Gentoo Foundation |
16 |
# Distributed under the terms of the GNU General Public License v2 |
17 |
|
18 |
import portage |
19 |
@@ -13,6 +13,19 @@ import stat |
20 |
import subprocess |
21 |
import tempfile |
22 |
|
23 |
+ |
24 |
+# Summary of all available hashes and their implementations, |
25 |
+# most preferred first. Please keep this in sync with logic below. |
26 |
+# ================================================================ |
27 |
+# |
28 |
+# MD5: python-fchksum, hashlib, mhash, hashlib/md5 |
29 |
+# SHA1: hashlib, mhash, hashlib/sha1 |
30 |
+# SHA256: hashlib, pycrypto, mhash |
31 |
+# SHA512: hashlib, mhash |
32 |
+# RMD160: hashlib, pycrypto, mhash |
33 |
+# WHIRLPOOL: hashlib, mhash, bundled |
34 |
+ |
35 |
+ |
36 |
#dict of all available hash functions |
37 |
hashfunc_map = {} |
38 |
hashorigin_map = {} |
39 |
-- |
40 |
2.12.0 |