rs_password_hash()

Description

ResourceSpace password hashing

Parameters

ColumnTypeDefaultDescription
$password string Password

Return

string|false Password hash or false on failure

Location

include/login_functions.php lines 303 to 313

Definition

 
function rs_password_hash(string $password)
{
    
$phi get_password_hash_info();
    
$algo $phi['algo'];
    
$options $phi['options'];

    
// Pepper password with a known (by the application) secret.
    
$hmac hash_hmac('sha256'$password$GLOBALS['scramble_key']);

    return 
password_hash($hmac$algo$options);
}

This article was last updated 24th April 2025 11:35 Europe/London time based on the source file dated 21st January 2025 15:20 Europe/London time.