summaryrefslogtreecommitdiffstats
path: root/old/botan/src/utils/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'old/botan/src/utils/ui.cpp')
-rw-r--r--old/botan/src/utils/ui.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/old/botan/src/utils/ui.cpp b/old/botan/src/utils/ui.cpp
new file mode 100644
index 0000000..e6c3430
--- /dev/null
+++ b/old/botan/src/utils/ui.cpp
@@ -0,0 +1,36 @@
+/*
+* User Interface
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#include <botan/ui.h>
+
+namespace Botan {
+
+/*
+* Get a passphrase from the user
+*/
+std::string User_Interface::get_passphrase(const std::string&,
+ const std::string&,
+ UI_Result& action) const
+ {
+ action = OK;
+
+ if(!first_try)
+ action = CANCEL_ACTION;
+
+ return preset_passphrase;
+ }
+
+/*
+* User_Interface Constructor
+*/
+User_Interface::User_Interface(const std::string& preset) :
+ preset_passphrase(preset)
+ {
+ first_try = true;
+ }
+
+}