§ htark / tools

§ hash

hash.

Multi-algorithm hashing in one shot. SHA-1/256/384/512 from Web Crypto; MD5 from a small inlined RFC 1321 implementation (Web Crypto removed MD5 because it's broken — but it's still everywhere as a content identifier). CRC32 also inlined.

encoding
input is UTF-8 encoded before hashing. matches what most CLIs (sha256sum, openssl dgst) do for plain text.
compare
case-insensitive equality on the hex digests. trims whitespace.

§ input

§ compare two hashes