Skip to main content

[pkg-discuss] Re: Updated sha-2 webrev

  • From: Tim Foster < >
  • To:
  • Cc: Danek Duvall < >
  • Subject: [pkg-discuss] Re: Updated sha-2 webrev
  • Date: Thu, 03 Oct 2013 11:32:11 +1300

On 10/ 3/13 11:00 AM, Danek Duvall wrote:
https://ips.java.net/webrev/timf/sha2-webrev-4
https://ips.java.net/webrev/timf/sha2-webrev-4/sha2-webrev-4-vs-3

Thanks for taking a look.

I found the name CONTENT_HASH_ALGS confusing; isn't it more accurately
CONTENT_HASH_ATTRS (or _ATTR_NAMES)?  Or is it just the use on line 307 of
file.py that's confusing (as I do see a RANKED_CONTENT_HASH_ATTRS defined
in digest.py)?

Well, it's more than just attributes names: CONTENT_HASH_ALGS is a mapping from all known content hash attributes to the hash algorithm functions that are used to compute them.

Elsewhere in digest.py, we have DEFAULT_CONTENT_HASH_ATTRS which is a list of attribute names, and RANKED_CONTENT_HASH_ATTRS, also a list.

We differentiate between the hashes we add during publication, vs. those we know how to compute - allowing us to deal with old manifests containing SHA-1 hashes, but (at some point in the distant future) publish only SHA-2 hashes on new packages.


To answer you question though, I suppose I could use RANKED_CONTENT_HASH_ATTRS instead of CONTENT_HASH_ALGS.keys() - it'd result in the same values.

        cheers,
                        tim


[pkg-discuss] Re: Updated sha-2 webrev

Danek Duvall 10/01/2013

[pkg-discuss] Re: Updated sha-2 webrev

Tim Foster 10/01/2013

[pkg-discuss] Re: Updated sha-2 webrev

Tim Foster 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Danek Duvall 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Tim Foster 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Shawn Walker 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Tim Foster 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Shawn Walker 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Tim Foster 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Shawn Walker 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Tim Foster 10/02/2013

[pkg-discuss] Re: Updated sha-2 webrev

Shawn Walker 10/03/2013

[pkg-discuss] Re: Updated sha-2 webrev

Tim Foster 10/03/2013

[pkg-discuss] Re: Updated sha-2 webrev

Danek Duvall 10/03/2013

[pkg-discuss] Re: Updated sha-2 webrev

Tim Foster 10/03/2013
 
 
Close
loading
Please Confirm
Close