Botan 1.10.17
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
10namespace Botan {
11
12/*
13* Get a passphrase from the user
14*/
15std::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*/
30User_Interface::User_Interface(const std::string& preset) :
31 preset_passphrase(preset)
32 {
33 first_try = true;
34 }
35
36}
virtual std::string get_passphrase(const std::string &, const std::string &, UI_Result &) const
Definition ui.cpp:15
std::string preset_passphrase
Definition ui.h:31
User_Interface(const std::string &="")
Definition ui.cpp:30