From 3b5539d8762d96be871fdfa7c1b62feee962304c Mon Sep 17 00:00:00 2001 From: moznion Date: Wed, 27 Apr 2016 14:07:05 +0900 Subject: [PATCH] Make to reverse argument order --- src/LINEBot/SignatureValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LINEBot/SignatureValidator.php b/src/LINEBot/SignatureValidator.php index e77a45cb..6bff0d1d 100644 --- a/src/LINEBot/SignatureValidator.php +++ b/src/LINEBot/SignatureValidator.php @@ -34,6 +34,6 @@ public static function validateSignature($json, $channelSecret, $signature) if (empty($signature)) { throw new InvalidSignatureException('Signature must not be empty'); } - return hash_equals($signature, base64_encode(hash_hmac('sha256', $json, $channelSecret, true))); + return hash_equals(base64_encode(hash_hmac('sha256', $json, $channelSecret, true)), $signature); } }