Generate SHA256 Hash on OSX Command Line

ilumin

Lumin

Posted on February 9, 2022

Generate SHA256 Hash on OSX Command Line

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 of its authors (Alfred Aho, Peter Weinberger, and Brian Kernighan)
  • Added -n to echo to prevent new line so that we will get the right SHA256 from our input string without newline 😺 (suggestion from @fallenpixel)
💖 💪 🙅 🚩
ilumin
Lumin

Posted on February 9, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related