Skip to content

Instantly share code, notes, and snippets.

@gipi
Created November 23, 2011 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gipi/1388419 to your computer and use it in GitHub Desktop.
Save gipi/1388419 to your computer and use it in GitHub Desktop.
Shell script to generate HMAC of a message
function get_hmac() {
message=$1
shared_key=$2
echo -n "$message" | openssl dgst -md5 -hmac "${shared_key}"
}
@marak8
Copy link

marak8 commented Jan 26, 2018

Can you do it without revealing the shared_key to every process running on the system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment