Skip to content

Commit

Permalink
Merge pull request juashyam#9 from peterjaap/patch-1
Browse files Browse the repository at this point in the history
PHP 8.1 compatibility
  • Loading branch information
juashyam authored Nov 20, 2022
2 parents e078fd2 + 7d7482f commit 70386c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Lib/PHPGangsta/GoogleAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public function createSecret($secretLength = 16)
$rnd = false;
if (function_exists('random_bytes')) {
$rnd = random_bytes($secretLength);
} elseif (function_exists('mcrypt_create_iv')) {
$rnd = mcrypt_create_iv($secretLength, MCRYPT_DEV_URANDOM);
} elseif (function_exists('openssl_random_pseudo_bytes')) {
$rnd = openssl_random_pseudo_bytes($secretLength, $cryptoStrong);
if (!$cryptoStrong) {
Expand Down Expand Up @@ -250,4 +248,4 @@ private function timingSafeEquals($safeString, $userString)
// They are only identical strings if $result is exactly 0...
return $result === 0;
}
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "juashyam/authenticator",
"description": "Magento 2 Backend 2FA implementation",
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0",
"php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0|~8.0.0|~8.1.0",
"magento/framework": "^100.1.0|101.0.*|^102.0.0"
},
"type": "magento2-module",
Expand All @@ -18,4 +18,4 @@
"Neyamtux\\Authenticator\\": ""
}
}
}
}

0 comments on commit 70386c0

Please sign in to comment.