mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
Add option to salt hash passwords
This commit is contained in:
@@ -77,9 +77,11 @@ function dol_decode($chain)
|
||||
*/
|
||||
function dol_hash($chain,$type=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if ($type == 1) return sha1($chain);
|
||||
else if ($type == 2) return sha1(md5($chain));
|
||||
else return md5($chain);
|
||||
else return md5((empty($conf->global->MAIN_SECURITY_SALT)?'':$conf->global->MAIN_SECURITY_SALT).$chain);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user