Botan: Botan::User_Interface Class Reference

Botan 1.10.17

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

## ◆ UI_Result

enum Botan::User_Interface::UI_Result

Enumerator
OK |
CANCEL_ACTION |

Definition at line 23 of file ui.h.

23 { OK, CANCEL_ACTION };
Botan::User_Interface::OK
Definition: ui.h:23
Botan::User_Interface::CANCEL_ACTION
Definition: ui.h:23

## Constructor & Destructor Documentation

## ◆ User_Interface()

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 }
Botan::User_Interface::preset_passphrase
std::string preset_passphrase
Definition: ui.h:31
Botan::User_Interface::first_try
bool first_try
Definition: ui.h:32

## ◆ ~User_Interface()

virtual Botan::User_Interface::~User_Interface | ( |  | ) |
| inlinevirtual

Definition at line 29 of file ui.h.

29 {}

## Member Function Documentation

## ◆ get_passphrase()

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 }
Botan::User_Interface::OK
Definition: ui.h:23
Botan::User_Interface::preset_passphrase
std::string preset_passphrase
Definition: ui.h:31
Botan::User_Interface::CANCEL_ACTION
Definition: ui.h:23
Botan::User_Interface::first_try
bool first_try
Definition: ui.h:32

## Member Data Documentation

## ◆ first_try

bool Botan::User_Interface::first_try
| mutableprotected

Definition at line 32 of file ui.h.

Referenced by get_passphrase(), and User_Interface().

## ◆ preset_passphrase

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:

- src/utils/ui.h
- src/utils/ui.cpp