Qt Cryptographic Architecture
|
#include <QtCrypto>
Public Member Functions | |
QDateTime | creationDate () const |
QDateTime | expirationDate () const |
QString | fingerprint () const |
bool | inKeyring () const |
bool | isNull () const |
bool | isSecret () const |
bool | isTrusted () const |
QString | keyId () const |
PGPKey & | operator= (const PGPKey &from) |
PGPKey () | |
PGPKey (const PGPKey &from) | |
PGPKey (const QString &fileName) | |
QString | primaryUserId () const |
QByteArray | toArray () const |
bool | toFile (const QString &fileName) const |
QString | toString () const |
QStringList | userIds () const |
![]() | |
Algorithm (const Algorithm &from) | |
void | change (const QString &type, const QString &provider) |
void | change (Provider::Context *c) |
Provider::Context * | context () |
const Provider::Context * | context () const |
Algorithm & | operator= (const Algorithm &from) |
Provider * | provider () const |
Provider::Context * | takeContext () |
QString | type () const |
Static Public Member Functions | |
static PGPKey | fromArray (const QByteArray &a, ConvertResult *result=nullptr, const QString &provider=QString()) |
static PGPKey | fromFile (const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString()) |
static PGPKey | fromString (const QString &s, ConvertResult *result=nullptr, const QString &provider=QString()) |
Additional Inherited Members | |
![]() | |
Algorithm () | |
Algorithm (const QString &type, const QString &provider) | |
Pretty Good Privacy key.
This holds either a reference to an item in a real PGP keyring, or a standalone item created using the from*() functions.
Note that with the latter method, the key is of no use besides being informational. The key must be in a keyring (that is, inKeyring() == true) to actually do crypto with it.
QCA::PGPKey::PGPKey | ( | ) |
Create an empty PGP key.
QCA::PGPKey::PGPKey | ( | const QString & | fileName | ) |
QCA::PGPKey::PGPKey | ( | const PGPKey & | from | ) |
Standard copy constructor.
from | the PGPKey to use as the source |
Standard assignment operator.
from | the PGPKey to use as the source |
bool QCA::PGPKey::isNull | ( | ) | const |
Test if the PGP key is empty (null)
QString QCA::PGPKey::keyId | ( | ) | const |
The Key identification for the PGP key.
QString QCA::PGPKey::primaryUserId | ( | ) | const |
The primary user identification for the key.
QStringList QCA::PGPKey::userIds | ( | ) | const |
The list of all user identifications associated with the key.
bool QCA::PGPKey::isSecret | ( | ) | const |
Test if the PGP key is the secret key.
QDateTime QCA::PGPKey::creationDate | ( | ) | const |
The creation date for the key.
QDateTime QCA::PGPKey::expirationDate | ( | ) | const |
The expiration date for the key.
QString QCA::PGPKey::fingerprint | ( | ) | const |
The key fingerpint.
This will return the PGP fingerprint as a string. It comprises 40 hex digits, without spaces.
bool QCA::PGPKey::inKeyring | ( | ) | const |
Test if this key is in a keyring.
bool QCA::PGPKey::isTrusted | ( | ) | const |
Test if the key is trusted.
QByteArray QCA::PGPKey::toArray | ( | ) | const |
QString QCA::PGPKey::toString | ( | ) | const |
Export the key to a string.
This will export the key in an "ascii armoured" form.
bool QCA::PGPKey::toFile | ( | const QString & | fileName | ) | const |
Export the key to a file.
fileName | the name of the file to save the key to |
|
static |
Import the key from an array.
a | the array to import from |
result | if not null, this will be set to the result of the import process |
provider | the provider to use, if a particular provider is required |
|
static |
Import the key from a string.
s | the string to import from |
result | if not null, this will be set to the result of the import process |
provider | the provider to use, if a particular provider is required |
|
static |
Import the key from a file.
fileName | string containing the name of the file to import from |
result | if not null, this will be set to the result of the import process |
provider | the provider to use, if a particular provider is required |