> On Sun, Feb 26, 2017 at 9:43 PM, Richard Hipp <d...@sqlite.org> wrote: > > > (2) Artifacts can be identified via multiple hash algorithms. The > > initial implementation will support SHA1 and SHA3-228. (For brevity, > > SHA3-228 will hereafter be referred to as K228.) > > (3) The low-level file formats > > (https://www.fossil-scm.org/fossil/doc/trunk/www/fileformat.wiki) are > > unchanged except that the artifact hashes are allowed to be longer > > than 40 hex digits for alternative hash algorithms. For K228, the > > hashes are 56 hex digits long. Other hash algorithms may be supported > > in future releases as long as each hash algorithm has a unique hash > > length, thus enabling Fossil to figure out which algorithm is being > > used simply by looking at the length of the hash. > > > > How about a '!' (ASCII 33d) card which tells Fossil which hash is in use > for a given artifact? '!' sorts before all other cards, placing it first in > the manifest. Maybe even add the artifact type, e.g.: > > ! m k228 > > Where m=manifest, though there's probably little reason to abbreviate it: > > ! manifest SHA3-228 > > > (Pardon my brevity - _still_ on medical leave and can't be as active online > as i'd like.)
Another possibility is to encode the (name of the) hash algorithm in the result, using it as prefix before the actual hash value. For example, for K228 a hash result would be "k228:3c658054301feb7e1cd25b66e32c94ffbf48d0b2f67310d33fb79a50" and for SHA1 we would have "sha1:ccdafa2a93e7bcefa1b4d0ea7474f9ce84c690f2" For backward compatability a hash without prefix would be treated as SHA-1. Different hashes with the same length of result are still distinguished via the prefix. -- So long, Andreas Kupries <akupr...@shaw.ca> <http://core.tcl.tk/akupries/> Developer @ Hewlett Packard Enterprise ------------------------------------------------------------------------------- _______________________________________________ fossil-dev mailing list fossil-dev@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev