monotone

monotone Mtn Source Tree

Root/botan/ui.cpp

1/*************************************************
2* User Interface Source File *
3* (C) 1999-2006 The Botan Project *
4*************************************************/
5
6#include <botan/ui.h>
7#include <botan/libstate.h>
8
9namespace Botan {
10
11/*************************************************
12* Get a passphrase from the user *
13*************************************************/
14std::string User_Interface::get_passphrase(const std::string&,
15 const std::string&,
16 UI_Result& action) const
17 {
18 action = OK;
19
20 if(!first_try)
21 action = CANCEL_ACTION;
22
23 return preset_passphrase;
24 }
25
26/*************************************************
27* User_Interface Constructor *
28*************************************************/
29User_Interface::User_Interface(const std::string& preset) :
30 preset_passphrase(preset)
31 {
32 first_try = true;
33 }
34
35}

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status