Пример #1
0
function get_hash()
{
    $len = 32;
    $field = 'user_pass';
    $out = '';
    echo "finding hash now ...\n";
    for ($i = 1; $i < $len + 1; $i++) {
        $ch = get_hashchar($field, $i);
        echo "got {$field} pos {$i} --> {$ch}\n";
        $out .= "{$ch}";
        echo "current value for {$field}: {$out} \n";
    }
    echo "\nFinal result: {$field}={$out}\n\n";
    return $out;
}
function get_hash($id)
{
    $len = 32;
    $out = '';
    xecho("Finding hash ...\n");
    for ($i = 1; $i < $len + 1; $i++) {
        $ch = get_hashchar($i, $id);
        xecho("Got pos {$i} --> {$ch}\n");
        $out .= "{$ch}";
        xecho("Current hash: {$out} \n");
    }
    xecho("\nFinal hash for ID {$id}: {$out}\n\n");
    return $out;
}