|
Qt Cryptographic Architecture
|
#include <QtCrypto>

Signals | |
| void | finished () |
Public Member Functions | |
| bool | blockingEnabled () const |
| PrivateKey | createDH (const DLGroup &domain, const QString &provider=QString()) |
| DLGroup | createDLGroup (QCA::DLGroupSet set, const QString &provider=QString()) |
| PrivateKey | createDSA (const DLGroup &domain, const QString &provider=QString()) |
| PrivateKey | createRSA (int bits, int exp=65537, const QString &provider=QString()) |
| DLGroup | dlGroup () const |
| bool | isBusy () const |
| PrivateKey | key () const |
| KeyGenerator (QObject *parent=0) | |
| void | setBlockingEnabled (bool b) |
Friends | |
| class | Private |
Class for generating asymmetric key pairs.
This class is used for generating asymmetric keys (public/private key pairs).
| QCA::KeyGenerator::KeyGenerator | ( | QObject * | parent = 0 | ) |
Create a new key generator.
| parent | the parent object, if applicable |
| bool QCA::KeyGenerator::blockingEnabled | ( | ) | const |
Test whether the key generator is set to operate in blocking mode, or not.
| void QCA::KeyGenerator::setBlockingEnabled | ( | bool | b | ) |
Set whether the key generator is in blocking mode, nor not.
| b | if true, the key generator will be set to operate in blocking mode, otherwise it will operate in non-blocking mode |
| bool QCA::KeyGenerator::isBusy | ( | ) | const |
Test if the key generator is currently busy, or not.
| PrivateKey QCA::KeyGenerator::createRSA | ( | int | bits, |
| int | exp = 65537, |
||
| const QString & | provider = QString() |
||
| ) |
Generate an RSA key of the specified length.
This method creates both the public key and corresponding private key. You almost certainly want to extract the public key part out - see PKey::toPublicKey for an easy way.
Key length is a tricky judgment - using less than 2048 is probably being too liberal for long term use. Don't use less than 1024 without serious analysis.
| bits | the length of key that is required |
| exp | the exponent - typically 3, 17 or 65537 |
| provider | the name of the provider to use, if a particular provider is required |
| PrivateKey QCA::KeyGenerator::createDSA | ( | const DLGroup & | domain, |
| const QString & | provider = QString() |
||
| ) |
Generate a DSA key.
This method creates both the public key and corresponding private key. You almost certainly want to extract the public key part out - see PKey::toPublicKey for an easy way.
| domain | the discrete logarithm group that this key should be generated from |
| provider | the name of the provider to use, if a particular provider is required |
| PrivateKey QCA::KeyGenerator::createDH | ( | const DLGroup & | domain, |
| const QString & | provider = QString() |
||
| ) |
Generate a Diffie-Hellman key.
This method creates both the public key and corresponding private key. You almost certainly want to extract the public key part out - see PKey::toPublicKey for an easy way.
| domain | the discrete logarithm group that this key should be generated from |
| provider | the name of the provider to use, if a particular provider is required |
| PrivateKey QCA::KeyGenerator::key | ( | ) | const |
Return the last generated key.
This is really only useful when you are working with non-blocking key generation
| DLGroup QCA::KeyGenerator::createDLGroup | ( | QCA::DLGroupSet | set, |
| const QString & | provider = QString() |
||
| ) |
Create a new discrete logarithm group.
| set | the set of discrete logarithm parameters to generate from |
| provider | the name of the provider to use, if a particular provider is required. |
| DLGroup QCA::KeyGenerator::dlGroup | ( | ) | const |
The current discrete logarithm group.
|
signal |
Emitted when the key generation is complete.
This is only used in non-blocking mode
1.8.13