QCA::PasswordAsker Class Reference

User password / passphrase / PIN handler. More...

#include <qca_core.h>

Inheritance diagram for QCA::PasswordAsker:

QObject Collaboration diagram for QCA::PasswordAsker:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PasswordAsker (QObject *parent=0)
void ask (Event::PasswordStyle pstyle, const KeyStoreInfo &keyStoreInfo, const KeyStoreEntry &keyStoreEntry, void *ptr)
void ask (Event::PasswordStyle pstyle, const QString &fileName, void *ptr)
void cancel ()
void waitForResponse ()
bool accepted () const
SecureArray password () const

Public Attributes

Q_SIGNALS __pad0__: void responseReady()

Friends

class Private

Detailed Description

User password / passphrase / PIN handler.

This class is used to obtain a password from a user.

Examples:

eventhandlerdemo.cpp.


Constructor & Destructor Documentation

QCA::PasswordAsker::PasswordAsker QObject parent = 0  ) 
 

Construct a new asker.

Parameters:
parent the parent object for this QObject


Member Function Documentation

void QCA::PasswordAsker::ask Event::PasswordStyle  pstyle,
const KeyStoreInfo keyStoreInfo,
const KeyStoreEntry keyStoreEntry,
void *  ptr
 

queue a password / passphrase request associated with a key store

Parameters:
pstyle the type of information required (e.g. PIN, passphrase or password)
keyStoreInfo info of the key store that the information is required for
keyStoreEntry the item in the key store that the information is required for (if applicable)
ptr opaque data
Examples:
eventhandlerdemo.cpp.

void QCA::PasswordAsker::ask Event::PasswordStyle  pstyle,
const QString fileName,
void *  ptr
 

queue a password / passphrase request associated with a file

Parameters:
pstyle the type of information required (e.g. PIN, passphrase or password)
fileName the name of the file that the information is required for
ptr opaque data

void QCA::PasswordAsker::cancel  ) 
 

Cancel the pending password / passphrase request.

void QCA::PasswordAsker::waitForResponse  ) 
 

Block until the password / passphrase request is completed.

You can use the responseReady signal instead of blocking, if appropriate.

Examples:
eventhandlerdemo.cpp.

bool QCA::PasswordAsker::accepted  )  const
 

Determine whether the password / passphrase was accepted or not.

In this context, returning true is indicative of the user clicking "Ok" or equivalent; and returning false indicates that either the user clicked "Cancel" or equivalent, or that the cancel() function was called, or that the request is still pending.

SecureArray QCA::PasswordAsker::password  )  const
 

The password / passphrase / PIN provided by the user in response to the asker request.

This may be empty.

Examples:
eventhandlerdemo.cpp.


The documentation for this class was generated from the following file:
Generated on Fri Jul 6 13:23:50 2007 for Qt Cryptographic Architecture by  doxygen 1.4.6