Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save caramelchocolate/b91fef7b3b5c45919d467b523294966a to your computer and use it in GitHub Desktop.
Save caramelchocolate/b91fef7b3b5c45919d467b523294966a to your computer and use it in GitHub Desktop.
sha256
$ php -r "echo hash('sha256','test');"
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
$ printf 'test' | openssl sha256
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
$ python --version
Python 3.6.0
$ python -c 'import hashlib; print(hashlib.sha256(b"test").hexdigest())'
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment