在php中验证X-Hub-Signature
的正确方法是什么?
我尝试过
$xHubSignature = $request->getHeader('X-Hub-Signature');
$postdata = file_get_contents("php://input");
$body = $request->getRawBody( );
$check = sha1('mysecret'.$postdata);
但这是行不通的。
最佳答案
hash_hmac( 'sha1', $postdata,'mysecret')
感谢Payom Dousti
https://groups.google.com/forum/?fromgroups=#!topic/instagram-api-developers/7nKyipJENdI
关于php - Instagram如何在PHP中验证X-Hub-Signature,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14975898/