Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1109 → Rev 1108

/trunk/plugins/viathinksoft/adminPages/900_software_update/private/gen_serverside
528,14 → 528,7
$cont = str_replace('$this->recanonizeObjects();', '', $cont);
file_put_contents($file, $cont);
}
if ($rev == 1108) {
// Fix runtime error that lead to a stalled update!
$file = $dir.'/vendor/danielmarschall/php_utils/vts_crypt.inc.php';
$cont = file_get_contents($file);
$cont = str_replace('echo "OK, password $password\n";', '', $cont);
file_put_contents($file, $cont);
}
}
 
function split_equal_length($data, $width=65) {
$res = '';
/trunk/vendor/danielmarschall/php_utils/vts_crypt.inc.php
315,7 → 315,7
 
if ($options['mode'] == PASSWORD_VTS_MCF1_MODE_PBKDF2) {
if (!isset($mcf['params']['i'])) throw new Exception('Param "i" (iterations) missing');
$options['iterations'] = (int)$mcf['params']['i'];
$options['iterations'] = $mcf['params']['i'];
}
 
return array(
338,7 → 338,7
"algo" => PASSWORD_EXT_DES,
"algoName" => "ext-des",
"options" => array(
"iterations" => (int)base64_int_decode(substr($hash,1,4))
"iterations" => base64_int_decode(substr($hash,1,4))
)
);
} else if (str_starts_with($hash, '$1$')) {
357,7 → 357,7
"algo" => PASSWORD_BLOWFISH,
"algoName" => "blowfish",
"options" => array(
"cost" => (int)ltrim(explode('$',$hash)[2],'0')
"cost" => explode('$',$hash)[2]
)
);
} else if (str_starts_with($hash, '$5$')) {
366,7 → 366,7
"algo" => PASSWORD_SHA256,
"algoName" => "sha256",
"options" => array(
'rounds' => (int)str_replace('rounds=','',explode('$',$hash)[2])
'rounds' => str_replace('rounds=','',explode('$',$hash)[2])
)
);
} else if (str_starts_with($hash, '$6$')) {
375,7 → 375,7
"algo" => PASSWORD_SHA512,
"algoName" => "sha512",
"options" => array(
'rounds' => (int)str_replace('rounds=','',explode('$',$hash)[2])
'rounds' => str_replace('rounds=','',explode('$',$hash)[2])
)
);
} else {
627,7 → 627,6
 
// --- Part 5: Selftest
 
/*
for ($i=0; $i<9999; $i++) {
assert($i===base64_int_decode(base64_int_encode($i,4)));
}
682,4 → 681,3
)));
 
echo "OK, password $password\n";
*/