#include <QtCrypto>
Public Types | |
enum | Type { None, PGP, X509 } |
Public Member Functions | |
bool | havePrivate () const |
bool | isNull () const |
QString | name () const |
SecureMessageKey & | operator= (const SecureMessageKey &from) |
PGPKey | pgpPublicKey () const |
PGPKey | pgpSecretKey () const |
SecureMessageKey (const SecureMessageKey &from) | |
SecureMessageKey () | |
void | setPGPPublicKey (const PGPKey &pub) |
void | setPGPSecretKey (const PGPKey &sec) |
void | setX509CertificateChain (const CertificateChain &c) |
void | setX509KeyBundle (const KeyBundle &kb) |
void | setX509PrivateKey (const PrivateKey &k) |
Type | type () const |
CertificateChain | x509CertificateChain () const |
PrivateKey | x509PrivateKey () const |
QCA::SecureMessageKey::SecureMessageKey | ( | ) |
Construct an empty key.
QCA::SecureMessageKey::SecureMessageKey | ( | const SecureMessageKey & | from | ) |
Standard copy constructor.
from | the source key |
bool QCA::SecureMessageKey::havePrivate | ( | ) | const |
Test if this key contains a private key part.
bool QCA::SecureMessageKey::isNull | ( | ) | const |
Returns true for null object.
QString QCA::SecureMessageKey::name | ( | ) | const |
The name associated with this key.
For a PGP key, this is the primary user ID
For an X.509 key, this is the Common Name
SecureMessageKey& QCA::SecureMessageKey::operator= | ( | const SecureMessageKey & | from | ) |
Standard assignment operator.
from | the source key |
PGPKey QCA::SecureMessageKey::pgpPublicKey | ( | ) | const |
Public key part of a PGP key.
PGPKey QCA::SecureMessageKey::pgpSecretKey | ( | ) | const |
Private key part of a PGP key.
void QCA::SecureMessageKey::setPGPPublicKey | ( | const PGPKey & | pub | ) |
Set the public key part of a PGP key.
pub | the PGP public key |
void QCA::SecureMessageKey::setPGPSecretKey | ( | const PGPKey & | sec | ) |
Set the private key part of a PGP key.
sec | the PGP secretkey |
void QCA::SecureMessageKey::setX509CertificateChain | ( | const CertificateChain & | c | ) |
Set the public key part of this X.509 key.
c | the Certificate chain containing the public keys |
void QCA::SecureMessageKey::setX509KeyBundle | ( | const KeyBundle & | kb | ) |
Set the public and private part of this X.509 key with KeyBundle.
kb | the public and private key bundle |
void QCA::SecureMessageKey::setX509PrivateKey | ( | const PrivateKey & | k | ) |
Set the private key part of this X.509 key.
k | the private key |
Type QCA::SecureMessageKey::type | ( | ) | const |
The key type.
CertificateChain QCA::SecureMessageKey::x509CertificateChain | ( | ) | const |
The X.509 certificate chain (public part) for this key.
PrivateKey QCA::SecureMessageKey::x509PrivateKey | ( | ) | const |
The X.509 private key part of this key.