Botan  1.10.9
Public Types | Public Member Functions | Protected Attributes | List of all members
Botan::User_Interface Class Reference

#include <ui.h>

Public Types

enum  UI_Result { OK, CANCEL_ACTION }
 

Public Member Functions

virtual std::string get_passphrase (const std::string &, const std::string &, UI_Result &) const
 
 User_Interface (const std::string &="")
 
virtual ~User_Interface ()
 

Protected Attributes

bool first_try
 
std::string preset_passphrase
 

Detailed Description

User Interface Only really used for callbacks for PKCS #8 decryption

Definition at line 20 of file ui.h.

Member Enumeration Documentation

Enumerator
OK 
CANCEL_ACTION 

Definition at line 23 of file ui.h.

Constructor & Destructor Documentation

Botan::User_Interface::User_Interface ( const std::string &  preset = "")

Definition at line 30 of file ui.cpp.

References first_try.

30  :
31  preset_passphrase(preset)
32  {
33  first_try = true;
34  }
std::string preset_passphrase
Definition: ui.h:31
bool first_try
Definition: ui.h:32
virtual Botan::User_Interface::~User_Interface ( )
inlinevirtual

Definition at line 29 of file ui.h.

29 {}

Member Function Documentation

std::string Botan::User_Interface::get_passphrase ( const std::string &  ,
const std::string &  ,
UI_Result action 
) const
virtual

Definition at line 15 of file ui.cpp.

References CANCEL_ACTION, first_try, OK, and preset_passphrase.

18  {
19  action = OK;
20 
21  if(!first_try)
22  action = CANCEL_ACTION;
23 
24  return preset_passphrase;
25  }
std::string preset_passphrase
Definition: ui.h:31
bool first_try
Definition: ui.h:32

Member Data Documentation

bool Botan::User_Interface::first_try
mutableprotected

Definition at line 32 of file ui.h.

Referenced by get_passphrase(), and User_Interface().

std::string Botan::User_Interface::preset_passphrase
protected

Definition at line 31 of file ui.h.

Referenced by get_passphrase().


The documentation for this class was generated from the following files: