From b50fbff1e3fd20f9da607d163df8092f37bc228a Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 27 Dec 2014 21:05:51 +0000 Subject: [PATCH] Update docblock --- src/TokenType/MAC.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/TokenType/MAC.php b/src/TokenType/MAC.php index 0d56faf6..c5003e99 100644 --- a/src/TokenType/MAC.php +++ b/src/TokenType/MAC.php @@ -118,6 +118,12 @@ class MAC extends AbstractTokenType implements TokenTypeInterface return ($this->hash_equals($calculatedSignature, $signature)) ? $accessToken : null; } + /** + * Prevent timing attack + * @param string $knownString + * @param string $userString + * @return bool + */ private function hash_equals($knownString, $userString) { if (!function_exists('hash_equals')) {