ladybird/Userland/Libraries/LibCore/GetPassword.h
Brian Gianforcaro 9e667453c7 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.
2021-09-12 16:36:52 +02:00

18 lines
342 B
C++

/*
* Copyright (c) 2020, Peter Elliott <pelliott@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/OSError.h>
#include <AK/Result.h>
#include <AK/String.h>
#include <LibCore/SecretString.h>
namespace Core {
Result<SecretString, OSError> get_password(const StringView& prompt = "Password: "sv);
}