Home > Net >  For a short period of PHP to c #
For a short period of PHP to c #

Time:09-29

Webhook const WEBHOOK_SECRET='secret key';
The function verifySignature ($body, $signature) {
$digest=hash_hmac (' sha1, $rawPost, WEBHOOK_SECRET);
Return $signature!==$digest;
}
if (! VerifySignature (file_get_contents (' PHP://input), $_SERVER [' HTTP_X_TAWK_SIGNATURE '])) {
//verification failed
}
//verification success
  •  Tags:  
  • C#
  • Related