DEV Community

Generate SHA256 Hash on OSX Command Line

Teerasak Vichadee on February 09, 2022

Just run echo -n any string | shasum -a 256 | awk '{ print $1 }' Fin. Note AWK are not acronym of awkward but it's acronym of the family names ...
Collapse
 
fallenpixel profile image
Eric Lehmann

Just something to be aware of. echo will include a terminal new line character at the end of your string without the -n flag.