1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:07:46 +00:00

LibCore: Change Account::set_password to take a SecretString

This matches the API of Account::authenticate. The only caller to this
API is the passwd utility, which already has the new password stored as
a SecretString.
This commit is contained in:
Timothy Flynn 2021-10-19 09:32:47 -04:00 committed by Andreas Kling
parent fcff6b7160
commit 4739982c66
3 changed files with 4 additions and 4 deletions

View file

@ -188,9 +188,9 @@ bool Account::login() const
return true;
}
void Account::set_password(const char* password)
void Account::set_password(SecretString const& password)
{
m_password_hash = crypt(password, get_salt().characters());
m_password_hash = crypt(password.characters(), get_salt().characters());
}
void Account::set_password_enabled(bool enabled)