Skip to content

Commit fd9faaa

Browse files
authored
Merge pull request #1 from driehle/feat/php8.2
Allow PHP 8.2 and drop PHP 7.3
2 parents 78b46f0 + f5fe10b commit fd9faaa

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.3 || ~8.0.0 || ~8.1.0"
24+
"php": ">=7.4 <8.3"
2525
},
2626
"require-dev": {
2727
"ergebnis/composer-normalize": "^2.18.0",
@@ -42,5 +42,10 @@
4242
"cs-check": "php-cs-fixer fix --dry-run --verbose",
4343
"cs-fix": "php-cs-fixer fix --verbose",
4444
"test": "phpunit"
45+
},
46+
"config": {
47+
"allow-plugins": {
48+
"ergebnis/composer-normalize": true
49+
}
4550
}
4651
}

library/Md5Crypt/Md5Crypt.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected static function to64($v, $n)
5555
$ret = '';
5656

5757
while (--$n >= 0) {
58-
$ret .= $itoa64[$v & 0x3f];
58+
$ret .= $itoa64[$v & 0x3F];
5959
$v = $v >> 6;
6060
}
6161

@@ -135,20 +135,20 @@ public static function unix($pw, $salt = null, $Magic = '$1$')
135135
$passwd = '';
136136
$passwd .= self::to64((intval(ord($final[0])) << 16)
137137
| (intval(ord($final[6])) << 8)
138-
| (intval(ord($final[12]))), 4);
138+
| intval(ord($final[12])), 4);
139139
$passwd .= self::to64((intval(ord($final[1])) << 16)
140140
| (intval(ord($final[7])) << 8)
141-
| (intval(ord($final[13]))), 4);
141+
| intval(ord($final[13])), 4);
142142
$passwd .= self::to64((intval(ord($final[2])) << 16)
143143
| (intval(ord($final[8])) << 8)
144-
| (intval(ord($final[14]))), 4);
144+
| intval(ord($final[14])), 4);
145145
$passwd .= self::to64((intval(ord($final[3])) << 16)
146146
| (intval(ord($final[9])) << 8)
147-
| (intval(ord($final[15]))), 4);
148-
$passwd .= self::to64((intval(ord($final[4]) << 16)
147+
| intval(ord($final[15])), 4);
148+
$passwd .= self::to64(intval(ord($final[4]) << 16)
149149
| (intval(ord($final[10])) << 8)
150-
| (intval(ord($final[5])))), 4);
151-
$passwd .= self::to64((intval(ord($final[11]))), 2);
150+
| intval(ord($final[5])), 4);
151+
$passwd .= self::to64(intval(ord($final[11])), 2);
152152

153153
// Return the final string
154154
return $Magic . $salt . '$' . $passwd;

0 commit comments

Comments
 (0)