added salt for crypt
This commit is contained in:
parent
d37bd1db71
commit
c2cae621e7
|
@ -150,7 +150,7 @@ function pwd_hash($password, $enabled = true, $hashType = 'SSHA') {
|
||||||
$hash = "";
|
$hash = "";
|
||||||
switch ($hashType) {
|
switch ($hashType) {
|
||||||
case 'CRYPT':
|
case 'CRYPT':
|
||||||
$hash = "{CRYPT}" . crypt($password);
|
$hash = "{CRYPT}" . crypt($password, generateSalt(2));
|
||||||
break;
|
break;
|
||||||
case 'CRYPT-SHA512':
|
case 'CRYPT-SHA512':
|
||||||
$hash = "{CRYPT}" . crypt($password, '$6$' . generateSalt(16));
|
$hash = "{CRYPT}" . crypt($password, '$6$' . generateSalt(16));
|
||||||
|
|
Loading…
Reference in New Issue