DonaldDrug
03.12.2010, 15:54
Hi,
hab hier ne funktion zum md5 hash salzen geschrieben:
function salty ($hash, $itemcut)
{
$salt = strrev($hash);
$length = strlen($hash);
$saltElements = ceil($length / $itemcut);
$str = '';
for($i = 0; $i < $saltElements; $i++)
{
$startItem = $i * $itemcut;
$endItem = $itemcut;
$str .= substr($hash, $startItem, $endItem);
$str .= $salt+++91;$i+++93;;
}
return $str;
}
function desalty ($hash, $itemcut)
{
$length = strlen($hash); /
$saltElements = floor($length / $itemcut);
$str = '';
$itemcut1 = $itemcut++;
for($i = 0; $i < $saltElements; $i++)
{
$startItem = $i * $itemcut;
$endItem = $itemcut1;
$str .= substr($hash, $startItem, $endItem);
}
return $str;
}+++91; = [
+++93; = ]
hab hier ne funktion zum md5 hash salzen geschrieben:
function salty ($hash, $itemcut)
{
$salt = strrev($hash);
$length = strlen($hash);
$saltElements = ceil($length / $itemcut);
$str = '';
for($i = 0; $i < $saltElements; $i++)
{
$startItem = $i * $itemcut;
$endItem = $itemcut;
$str .= substr($hash, $startItem, $endItem);
$str .= $salt+++91;$i+++93;;
}
return $str;
}
function desalty ($hash, $itemcut)
{
$length = strlen($hash); /
$saltElements = floor($length / $itemcut);
$str = '';
$itemcut1 = $itemcut++;
for($i = 0; $i < $saltElements; $i++)
{
$startItem = $i * $itemcut;
$endItem = $itemcut1;
$str .= substr($hash, $startItem, $endItem);
}
return $str;
}+++91; = [
+++93; = ]