Element
01-06-2006, 08:59 AM
Can someone with good PHP knowledge evaluate this code? I'm not sure if it is even better, and how if possible could it work for single strings?
// The function:
function AuthenticMD5($username, $password)
{
$one = $username;
$two = $password;
$thr = $one . $two;
$fou = $thr . $one;
$fiv = $fou . $one;
$six = $thr . $thr;$sev = $one . $two . $thr . $one;
$md1 = md5( $sev . $two . md5($one . $fiv . md5($sev . strrev( $sev))));
$md2 = md5( $md1 . md5( $one . $thr . $fou . md5( $sev . $md1)));
$md3 = md5( $md2 . md5($md1));
$md4 = md5( $md3 . $md1 . $md2 . md5($sev));
return $md2 . $md1. $md4 . md5($md3 . $md2);
}
From what it looks like it creates a single hash out of a username and password.
// The function:
function AuthenticMD5($username, $password)
{
$one = $username;
$two = $password;
$thr = $one . $two;
$fou = $thr . $one;
$fiv = $fou . $one;
$six = $thr . $thr;$sev = $one . $two . $thr . $one;
$md1 = md5( $sev . $two . md5($one . $fiv . md5($sev . strrev( $sev))));
$md2 = md5( $md1 . md5( $one . $thr . $fou . md5( $sev . $md1)));
$md3 = md5( $md2 . md5($md1));
$md4 = md5( $md3 . $md1 . $md2 . md5($sev));
return $md2 . $md1. $md4 . md5($md3 . $md2);
}
From what it looks like it creates a single hash out of a username and password.