Skip to content

Commit

Permalink
Remove PHP version check
Browse files Browse the repository at this point in the history
PHP version is enforced in composer.json
  • Loading branch information
kelvinmo committed Nov 12, 2024
1 parent 215c3ba commit 24ae7eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions src/SimpleJWT/Crypt/Encryption/AESGCM.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public function __construct(?string $alg) {
* {@inheritdoc}
*/
public function getSupportedAlgs(): array {
if (!version_compare(PHP_VERSION, '7.1', '>=')) return [];

$ciphers = array_map('strtolower', openssl_get_cipher_methods());
$results = [];

Expand Down
6 changes: 1 addition & 5 deletions src/SimpleJWT/Util/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@ static public function secure_compare(string $str1, string $str2): bool {
*/
static function packInt64(int $x): string {
if (PHP_INT_SIZE == 8) {
if (version_compare(PHP_VERSION, '5.6.3', '>=')) {
return pack('J', $x);
} else {
return pack('NN', ($x & 0xFFFFFFFF00000000) >> 32, $x & ($x & 0x00000000FFFFFFFF));
}
return pack('J', $x);
} else {
// 32-bit system
return "\x00\x00\x00\x00" . pack('N', $x);
Expand Down

0 comments on commit 24ae7eb

Please sign in to comment.