Fix base32 test
All checks were successful
Build / AerScript (push) Successful in 33s

This commit is contained in:
Rafal Kupiec 2025-08-29 14:34:04 +02:00
parent 5ff7d03ed1
commit c4023d62e1
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -23,7 +23,7 @@ class Base32 {
}
string[] $fiveBitBinaryArray = str_split($binaryString, 5);
string $base32 = '';
$i = 0;
int $i = 0;
while($i < sizeof($fiveBitBinaryArray)) {
$base32 += Base32::$map[base_convert(str_pad($fiveBitBinaryArray[$i], 5,'0'), 2, 10)];
$i++;
@ -50,7 +50,7 @@ class Base32 {
$input = str_replace('=','', $input);
char[] $aInput = str_split($input);
string $binaryString = '';
for($i = 0; $i < sizeof($aInput); $i = $i + 8) {
for(int $i = 0; $i < sizeof($aInput); $i = $i + 8) {
string $x = '';
if(!in_array($input[$i], Base32::$map))
return '';