Skip to content

Instantly share code, notes, and snippets.

@gquintard
Created October 20, 2017 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gquintard/bb4dbbfdcfca4a9b999e01971a9324a2 to your computer and use it in GitHub Desktop.
Save gquintard/bb4dbbfdcfca4a9b999e01971a9324a2 to your computer and use it in GitHub Desktop.
#!/bin/bash
# usage: token_checker.sh KEY [STRING....]
key="$1"
shift
s=
for i in "$@"; do
s="$s$i"
done
echo $s
echo -n "$s" | openssl sha256 -hmac "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment