Skip to content

Commit

Permalink
Make to reverse argument order
Browse files Browse the repository at this point in the history
  • Loading branch information
moznion committed Apr 27, 2016
1 parent 5b752da commit 3b5539d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LINEBot/SignatureValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 3b5539d

Please sign in to comment.