function get_hash_entry($hash)
{
    require_once $PHP_INCLUDE_PATH . "validate.php";
    if (!isValidHash($hash)) {
        die($ERROR_MSG);
    }
    return lookup_hash($hash);
}
Exemple #2
0
function calc_new_hash($input)
{
    $len = 4;
    $flag = false;
    while (1) {
        $hash = custom_hash($input, $len);
        if (mysql_num_rows(lookup_hash($hash)) == 0) {
            break;
        }
        $len++;
    }
    return $hash;
}