Skip to content

Instantly share code, notes, and snippets.

@HassenIO
Last active January 21, 2022 10:27
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save HassenIO/9bb633e4325e7d8ce5bf8cc4eeca33b5 to your computer and use it in GitHub Desktop.
Save HassenIO/9bb633e4325e7d8ce5bf8cc4eeca33b5 to your computer and use it in GitHub Desktop.
Get SHA256 of a text in Mac OSX terminal
# Get SHA256 of a text
# Usage: sha256 password
# output: 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
function sha256() {
echo -n $1 | shasum -a 256
# Source: http://albertech.blogspot.fr/2015/02/generate-sha-256-hash-from-command-line.html
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment