mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:57:35 +00:00
LibCore: Make get_password return SecretString instead of String
We shouldn't let secrets sit around in memory, as they could potentially be retrieved by an attacker, or left in memory during a core dump.
This commit is contained in:
parent
3bf6902790
commit
9e667453c7
6 changed files with 12 additions and 10 deletions
|
@ -9,9 +9,10 @@
|
|||
#include <AK/OSError.h>
|
||||
#include <AK/Result.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibCore/SecretString.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
Result<String, OSError> get_password(const StringView& prompt = "Password: ");
|
||||
Result<SecretString, OSError> get_password(const StringView& prompt = "Password: "sv);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue