From a0f56c09c1be142c387f2ca01eb3565c59b09200 Mon Sep 17 00:00:00 2001 From: Dennis Riehle Date: Thu, 29 Dec 2022 14:47:52 +0100 Subject: [PATCH 1/2] allow PHP 8.2 and drop PHP 7.3 --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 71f7b4e..82c694c 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ } ], "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": ">=7.4 <8.3" }, "require-dev": { "ergebnis/composer-normalize": "^2.18.0", @@ -42,5 +42,10 @@ "cs-check": "php-cs-fixer fix --dry-run --verbose", "cs-fix": "php-cs-fixer fix --verbose", "test": "phpunit" + }, + "config": { + "allow-plugins": { + "ergebnis/composer-normalize": true + } } } From f5fe10bf80e09ca2c6e7362a4bdac2d7d74e20a4 Mon Sep 17 00:00:00 2001 From: Dennis Riehle Date: Thu, 29 Dec 2022 14:59:14 +0100 Subject: [PATCH 2/2] fixed coding standards --- library/Md5Crypt/Md5Crypt.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/Md5Crypt/Md5Crypt.php b/library/Md5Crypt/Md5Crypt.php index 23e9094..25d82d1 100644 --- a/library/Md5Crypt/Md5Crypt.php +++ b/library/Md5Crypt/Md5Crypt.php @@ -55,7 +55,7 @@ protected static function to64($v, $n) $ret = ''; while (--$n >= 0) { - $ret .= $itoa64[$v & 0x3f]; + $ret .= $itoa64[$v & 0x3F]; $v = $v >> 6; } @@ -135,20 +135,20 @@ public static function unix($pw, $salt = null, $Magic = '$1$') $passwd = ''; $passwd .= self::to64((intval(ord($final[0])) << 16) | (intval(ord($final[6])) << 8) - | (intval(ord($final[12]))), 4); + | intval(ord($final[12])), 4); $passwd .= self::to64((intval(ord($final[1])) << 16) | (intval(ord($final[7])) << 8) - | (intval(ord($final[13]))), 4); + | intval(ord($final[13])), 4); $passwd .= self::to64((intval(ord($final[2])) << 16) | (intval(ord($final[8])) << 8) - | (intval(ord($final[14]))), 4); + | intval(ord($final[14])), 4); $passwd .= self::to64((intval(ord($final[3])) << 16) | (intval(ord($final[9])) << 8) - | (intval(ord($final[15]))), 4); - $passwd .= self::to64((intval(ord($final[4]) << 16) + | intval(ord($final[15])), 4); + $passwd .= self::to64(intval(ord($final[4]) << 16) | (intval(ord($final[10])) << 8) - | (intval(ord($final[5])))), 4); - $passwd .= self::to64((intval(ord($final[11]))), 2); + | intval(ord($final[5])), 4); + $passwd .= self::to64(intval(ord($final[11])), 2); // Return the final string return $Magic . $salt . '$' . $passwd;