Botan: src/utils/ui.cpp Source File

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

ui.cpp
Go to the documentation of this file.
1 /*
2 * User Interface
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #include <botan/ui.h>
9
10 namespace Botan {
11
12 /*
13 * Get a passphrase from the user
14 */
15 std::string User_Interface::get_passphrase(const std::string&,
16 const std::string&,
17 UI_Result& action) const
18 {
19 action = OK;
20
21 if(!first_try)
22 action = CANCEL_ACTION;
23
24 return preset_passphrase;
25 }
26
27 /*
28 * User_Interface Constructor
29 */
30 User_Interface::User_Interface(const std::string& preset) :
31 preset_passphrase(preset)
32 {
33 first_try = true;
34 }
35
36 }
Botan::User_Interface::OK
Definition: ui.h:23
Botan::User_Interface::preset_passphrase
std::string preset_passphrase
Definition: ui.h:31
Botan::User_Interface::UI_Result
UI_Result
Definition: ui.h:23
Botan
Definition: algo_base.h:14
Botan::User_Interface::CANCEL_ACTION
Definition: ui.h:23
Botan::User_Interface::first_try
bool first_try
Definition: ui.h:32
Botan::User_Interface::User_Interface
User_Interface(const std::string &="")
Definition: ui.cpp:30
Botan::User_Interface::get_passphrase
virtual std::string get_passphrase(const std::string &, const std::string &, UI_Result &) const
Definition: ui.cpp:15