[categories] [index] [all (552)] [latest]
strings digests
MD5
$ echo "asd" | md5
e07910a06a086c83ba41827aa00b26ed
now without digesting the trailing NUL
$ md5 -s "asd"
MD5 ("asd") = 7815696ecbf1c96e6894b779456d330e
SHA
$ echo "asd" | shasum -a 256
dc460da4ad72c482231e28e688e01f2778a88ce31a08826899d54ef7183998b5 -
-a
may be 1 (default), 224, 256, 384, 512
files digests
$ echo "asd" > asd.txt
MD5
$ openssl dgst -md5 asd.txt
MD5(asd.txt)= e07910a06a086c83ba41827aa00b26ed
SHA
$ openssl dgst -sha256 asd.txt
SHA256(asd.txt)= dc460da4ad72c482231e28e688e01f2778a88ce31a08826899d54ef7183998b5