[users] Use yescrypt instead of sha512

Use yescrypt instead of sha512 when CRYPT_GENSALT is not used and the salt is manually determined.

yescrypt is the default key derivation function in almost every modern distro and grants higher levels of security.

https://www.openwall.com/yescrypt/
This commit is contained in:
Lorenzo "Palinuro" Faletra 2024-06-28 12:55:25 +00:00 committed by GitHub
parent b49fd32cfb
commit d75648f326
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,7 @@ SetPasswordJob::make_salt( int length )
cWarning() << "Entropy data for salt is low-quality."; cWarning() << "Entropy data for salt is low-quality.";
} }
salt_string.insert( 0, "$6$" ); salt_string.insert( 0, "$y$" );
salt_string.append( '$' ); salt_string.append( '$' );
return salt_string; return salt_string;
} }