我想知道,有没有办法hash_hmac("sha256", $token, $signkey, true)在经典ASP中实现(php)?
我需要它来验证来自Facebook的signed_request https://developers.facebook.com/docs/howtos/login/signed-request/
// Adding the verification of the signed_request below
$expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);
if ($sig !== $expected_sig) {
error_log('Bad Signed JSON signature!');
return null;
}
Run Code Online (Sandbox Code Playgroud) asp-classic ×1