Created
December 14, 2012 08:21
-
-
Save samwize/4283617 to your computer and use it in GitHub Desktop.
Compute signature of a http from Hoiio. This is used to authenticate the notification from Hoiio. Match this computed signature with the HTTP header "X-Hoiio-Signature".
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
<?php | |
function computeHoiioSignature($payload, $accessToken) { | |
// hash_hmac will return a hex of the digest | |
$signature =hash_hmac('sha256', $payload, $accessToken); | |
return $signature; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment