Collections functions
General functions
Render functions
Theme permission 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 302 to 312

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 28th November 2022 04:05 Europe/London time based on the source file dated 1st July 2022 09:30 Europe/London time.