Skip to content

Commit

Permalink
Merge pull request #36 from Spomky-Labs/analysis-zDZwkX
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
Spomky committed Nov 9, 2015
2 parents ea577f5 + 38acad1 commit 4e1e8d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/OTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,15 @@ private function intToByteString($int)

return str_pad(implode(array_reverse($result)), 8, "\000", STR_PAD_LEFT);
}

protected function compareOTP($safe, $user)
{
if (function_exists('hash_equals')) {
return hash_equals($safe, $user);
}
$safeLen = strlen($safe);
$userLen = strlen($user);

if ($userLen !== $safeLen) {
return false;
}
Expand Down

0 comments on commit 4e1e8d4

Please sign in to comment.