Skip to content

Instantly share code, notes, and snippets.

@jazlopez
Created December 31, 2022 17:58
Show Gist options
  • Select an option

  • Save jazlopez/d4ec33a8214924565bc2c2c48c84cd75 to your computer and use it in GitHub Desktop.

Select an option

Save jazlopez/d4ec33a8214924565bc2c2c48c84cd75 to your computer and use it in GitHub Desktop.
Create hash strings with openssl
!#/bin/bash
# Create hash strings with openssl
# Jaziel Lopez <jazlopez @ github.com>
INPUT="foo"
# MD5 HASH
echo "${INPUT}" | openssl dgst -md5 | awk '{print $2}'
# SHA256 HASH
echo "${INPUT}" | openssl dgst -sha256 | awk '{print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment