- //* DEBUG: */ outputHtml(__FUNCTION__.':'.intval(isExtensionInstalled('sql_patches')).'/'.intval(isConfigEntrySet('_PRIME')).'/'.intval(isConfigEntrySet('secret_key')).'/'.intval(isConfigEntrySet('master_salt')).'<br />');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, intval(isExtensionInstalled('sql_patches')) . '/' . intval(isConfigEntrySet('_PRIME')) . '/' . intval(isConfigEntrySet('secret_key')) . '/' . intval(isConfigEntrySet('master_salt')));
if ((isExtensionInstalled('sql_patches')) && (isConfigEntrySet('_PRIME')) && (isConfigEntrySet('secret_key')) && (isConfigEntrySet('master_salt'))) {
// Only calculate when the secret key is generated
if ((isExtensionInstalled('sql_patches')) && (isConfigEntrySet('_PRIME')) && (isConfigEntrySet('secret_key')) && (isConfigEntrySet('master_salt'))) {
// Only calculate when the secret key is generated
if ((strlen($passHash) != 49) || (strlen(getConfig('secret_key')) != 40)) {
// Both keys must have same length so return unencrypted
if ((strlen($passHash) != 49) || (strlen(getConfig('secret_key')) != 40)) {
// Both keys must have same length so return unencrypted
- logDebugMessage(__FUNCTION__, __LINE__, strlen($passHash).'!=49/'.strlen(getConfig('secret_key')).'!=40');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, strlen($passHash) . '!=49/' . strlen(getConfig('secret_key')) . '!=40');
for ($idx = 0; $idx < 20; $idx++) {
$part1 = hexdec(substr($passHash, ($idx * 2) + (strlen($passHash) - strlen(getConfig('secret_key'))), 2));
$part2 = hexdec(substr(getConfig('secret_key'), $start, 2));
for ($idx = 0; $idx < 20; $idx++) {
$part1 = hexdec(substr($passHash, ($idx * 2) + (strlen($passHash) - strlen(getConfig('secret_key'))), 2));
$part2 = hexdec(substr(getConfig('secret_key'), $start, 2));
$mod = dechex(sqrt(($part2 - $part1) * getConfig('_PRIME') / pi()));
}
$mod = substr($mod, 0, 2);
$mod = dechex(sqrt(($part2 - $part1) * getConfig('_PRIME') / pi()));
}
$mod = substr($mod, 0, 2);