Created
November 23, 2011 10:52
-
-
Save gipi/1388419 to your computer and use it in GitHub Desktop.
Shell script to generate HMAC of a message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_hmac() { | |
message=$1 | |
shared_key=$2 | |
echo -n "$message" | openssl dgst -md5 -hmac "${shared_key}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you do it without revealing the
shared_key
to every process running on the system?