Created
May 28, 2019 03:57
-
-
Save gmanual/b9051d622865b0bab13d4c2b75004759 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
$jsonPayload = '{}'; | |
$signing_key = '6e6aa83e-e262-4c0a-8497-46acea553989'; | |
$hmac = base64_encode(hash_hmac("sha256", $jsonPayload, hash('sha256', $signing_key, true) ,true)); | |
echo PHP_EOL; | |
echo "Json Payload:" . PHP_EOL . $jsonPayload . PHP_EOL; | |
echo PHP_EOL; | |
echo "Sign Key : " . $signing_key . PHP_EOL; | |
echo "Generated: " . $hmac . PHP_EOL; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment