Ejemplo n.º 1
0
/**
 * Generate a random and unique string to use as the identifier for the login
 * cookie.
 * @return string Random and unique 384bit cookie string of encoded according to the base64 with URI safe alphabet approach described in RFC4648
 * @access public
 */
function auth_generate_unique_cookie_string()
{
    do {
        $t_cookie_string = crypto_generate_uri_safe_nonce(64);
    } while (!auth_is_cookie_string_unique($t_cookie_string));
    return $t_cookie_string;
}
Ejemplo n.º 2
0
/**
 * Generate a UNIQUE string to use as the identifier for the login cookie
 * The string returned should be 64 characters in length
 * @return string 64 character cookie string
 * @access public
 */
function auth_generate_unique_cookie_string()
{
    do {
        $t_cookie_string = auth_generate_cookie_string();
    } while (!auth_is_cookie_string_unique($t_cookie_string));
    return $t_cookie_string;
}