|
Qt Cryptographic Architecture
|
#include <QtCrypto>

Signals | |
| void | finished () |
Public Member Functions | |
| ConsolePrompt (QObject *parent=0) | |
| void | getChar () |
| void | getHidden (const QString &promptStr) |
| SecureArray | result () const |
| QChar | resultChar () const |
| void | waitForFinished () |
Friends | |
| class | Private |
Console prompt handler.
This class provides a convenient way to get user input in a secure way, as shown below:
| QCA::ConsolePrompt::ConsolePrompt | ( | QObject * | parent = 0 | ) |
Standard constructor.
| parent | the parent object for this object |
| void QCA::ConsolePrompt::getHidden | ( | const QString & | promptStr | ) |
Allow the user to enter data without it being echo'd to the terminal.
This is particularly useful for entry of passwords, passphrases and PINs.
| promptStr | the prompt to display to the user |
| void QCA::ConsolePrompt::getChar | ( | ) |
Obtain one character from the user.
| void QCA::ConsolePrompt::waitForFinished | ( | ) |
Block waiting for user input.
You may wish to use the finished() signal to avoid blocking.
| SecureArray QCA::ConsolePrompt::result | ( | ) | const |
Obtain the result of the user input.
This method is usually called to obtain data from the user that was requested by the getHidden() call.
| QChar QCA::ConsolePrompt::resultChar | ( | ) | const |
Obtain the result of the user input.
This method is usually called to obtain data from the user that was requested by the getChar() call.
|
signal |
Emitted when the user input activity has been completed.
This corresponds to the provision of a string for getHidden() or a single character for getChar().
1.8.11