mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-20 03:36:20 +02:00
change default for php_crypt to SHA512
(+ a few whitespace changes)
This commit is contained in:
parent
bd5ac21398
commit
a3feba7c73
@ -1060,7 +1060,7 @@ function _pacrypt_php_crypt($pw, $pw_db) {
|
|||||||
// existing pw provided. send entire password hash as salt for crypt() to figure out
|
// existing pw provided. send entire password hash as salt for crypt() to figure out
|
||||||
$salt = $pw_db;
|
$salt = $pw_db;
|
||||||
} else {
|
} else {
|
||||||
$salt_method = 'MD5'; // default.
|
$salt_method = 'SHA512'; // default.
|
||||||
// no pw provided. create new password hash
|
// no pw provided. create new password hash
|
||||||
if (strpos($CONF['encrypt'], ':') !== false) {
|
if (strpos($CONF['encrypt'], ':') !== false) {
|
||||||
// use specified hash method
|
// use specified hash method
|
||||||
@ -1076,7 +1076,7 @@ function _pacrypt_php_crypt($pw, $pw_db) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// used for php_crypt method
|
// used for php_crypt method
|
||||||
function _php_crypt_generate_crypt_salt($hash_type='MD5') {
|
function _php_crypt_generate_crypt_salt($hash_type='SHA512') {
|
||||||
// generate a salt (with magic matching chosen hash algorithm) for the PHP crypt() function
|
// generate a salt (with magic matching chosen hash algorithm) for the PHP crypt() function
|
||||||
|
|
||||||
// most commonly used alphabet
|
// most commonly used alphabet
|
||||||
|
Loading…
Reference in New Issue
Block a user