On 05/12/2010 02:10 PM, James Snell wrote:
On Wed, May 12, 2010 at 12:53 PM, Bob Wyman<[email protected]> wrote:
James, thanks for updating and revising this draft!
I would strongly encourage you to make the markup more expressive and
flexible by supporting "a generic hash attribute with an internal structure
for specifying algorithm and value". Actually, I would suggest that you
extend this a bit further to include a specification of the encoding for the
hash value.Thus, I would suggest the following pattern:
hash_algorithm.encoding.hash_value
Hmm... for me, this immediately starts screaming overkill. I'd almost
prefer to go the route of defining individual attributes for each hash
algorithm... e.g.
md5="..."
sha256="..."
Each using the basic hex encoding.
The spec can define a handful of these for the most common hash
algorithms and establish the pattern. New attributes for new
algorithms can be added later.
Just seems simpler.
Strongly agreed.
Having one attribute which can represent all hash types would be useful
only if there were some way for a consumer to dynamically discover how
to produce a hash of a particular type, which is not practical.
Otherwise, an implementation must already have a fixed set of supported
hash types, in which case it is beneficial to separate them into
separate attributes so that publishers can choose to produce more than
one of them to accomodate the capabilities of different consumers, each
of which will support only a subset of the set of all existing hash
algorithms.