mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:02:43 +00:00 
			
		
		
		
	 9e667453c7
			
		
	
	
		9e667453c7
		
	
	
	
	
		
			
			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.
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			342 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			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);
 | |
| 
 | |
| }
 |