Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

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 295 to 305

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 19th March 2024 06:05 Europe/London time based on the source file dated 20th February 2024 17:10 Europe/London time.