Add display options to new HASH function

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jul 7, 2008
17
1
#1
I just upgraded to v21 and I appreciate the new hash function but I think it would benefit from three additions:
  1. Add a switch for lowercase hex output. Most utilities (including Windows own built-in hash generator) and websites that provide hash values for verification list them in lowercase making comparison easier. I also find lowercase hex values easier to read.
  2. Similarly, add a switch that displays the output in what I would describe as linux-standard format: the (lowercase) hash value + 2 spaces + the filename. I have been using aliases to do this such as:
    alias sha256=do v in %$ (echo %@lower[%@sha256["%v"]] %v)
  3. A switch that takes a hash value (or list of hash values) and compares it to the generated value(s) to automatically validate known hashes.