Kpgp::Key Class Reference
This class is used to store information about a PGP key. More...
#include <kpgpkey.h>
Public Member Functions | |
Key (const KeyID &keyid=KeyID(), const QString &uid=QString::null, const bool secret=false) | |
void | clear () |
bool | secret () const |
bool | revoked () const |
bool | expired () const |
bool | disabled () const |
bool | invalid () const |
bool | canEncrypt () const |
bool | canSign () const |
bool | canCertify () const |
void | setSecret (const bool secret) |
void | setRevoked (const bool revoked) |
void | setExpired (const bool expired) |
void | setDisabled (const bool disabled) |
void | setInvalid (const bool invalid) |
void | setCanEncrypt (const bool canEncrypt) |
void | setCanSign (const bool canSign) |
void | setCanCertify (const bool canCertify) |
EncryptPref | encryptionPreference () |
void | setEncryptionPreference (const EncryptPref encrPref) |
QString | primaryUserID () const |
KeyID | primaryKeyID () const |
QCString | primaryFingerprint () const |
bool | isNull () const |
time_t | creationDate () const |
Validity | keyTrust () const |
Validity | keyTrust (const QString &uid) const |
void | cloneKeyTrust (const Key *key) |
bool | isValid () const |
bool | isValidEncryptionKey () const |
bool | isValidSigningKey () const |
const UserIDList | userIDs () const |
const SubkeyList | subkeys () const |
void | addUserID (const QString &uid, const Validity validity=KPGP_VALIDITY_UNKNOWN, const bool revoked=false, const bool invalid=false) |
void | addUserID (const UserID *userID) |
bool | matchesUserID (const QString &str, bool cs=true) |
void | addSubkey (const KeyID &keyID, const bool secret=false) |
void | addSubkey (const Subkey *subkey) |
Subkey * | getSubkey (const KeyID &keyID) |
void | setFingerprint (const KeyID &keyID, const QCString &fpr) |
Protected Attributes | |
bool | mSecret: 1 |
bool | mRevoked: 1 |
bool | mExpired: 1 |
bool | mDisabled: 1 |
bool | mInvalid: 1 |
bool | mCanEncrypt: 1 |
bool | mCanSign: 1 |
bool | mCanCertify: 1 |
EncryptPref | mEncryptPref |
SubkeyList | mSubkeys |
UserIDList | mUserIDs |
Detailed Description
This class is used to store information about a PGP key.
Definition at line 432 of file kpgpkey.h.
Constructor & Destructor Documentation
|
Constructs a new PGP key with keyid as key ID of the primary key and uid as primary user ID.
Definition at line 84 of file kpgpkey.cpp. References addSubkey(), and addUserID(). |
Member Function Documentation
|
Clears/resets all key data.
Definition at line 114 of file kpgpkey.cpp. |
|
Returns true if the key is a secret key.
|
|
Returns true if the key has been revoked.
|
|
Returns true if the key has expired.
|
|
Returns true if the key has been disabled.
|
|
Returns true if the key is invalid.
|
|
Returns true if the key can be used to encrypt data.
|
|
Returns true if the key can be used to sign data.
|
|
Returns true if the key can be used to certify keys.
|
|
Sets the flag if the key is a secret key to secret.
|
|
Sets the flag if the key has been revoked to revoked.
|
|
Sets the flag if the key has expired to expired.
|
|
Sets the flag if the key has been disabled to disabled.
|
|
Sets the flag if the key is invalid to invalid.
|
|
Sets the flag if the key can be used to encrypt data to canEncrypt.
|
|
Sets the flag if the key can be used to sign data to canSign.
|
|
Sets the flag if the key can be used to certify keys to canCertify.
|
|
Returns the encryption preference for this key.
|
|
Sets the encryption preference for this key to encrPref.
|
|
Returns the primary user ID or a null string if there are no user IDs.
Definition at line 693 of file kpgpkey.h. References Kpgp::UserID::text(). |
|
Returns the key ID of the primary key or a null string if there are no subkeys.
Definition at line 703 of file kpgpkey.h. References Kpgp::Subkey::keyID(). |
|
Returns the fingerprint of the primary key or a null string if there are no subkeys.
Definition at line 713 of file kpgpkey.h. References Kpgp::Subkey::fingerprint(). |
|
Returns true if there are no user IDs or no subkeys.
|
|
Returns the creation date of the primary subkey.
|
|
Returns the trust value of this key. This is the maximal trust value of any of the user ids of this key. Definition at line 134 of file kpgpkey.cpp. Referenced by cloneKeyTrust(). |
|
Returns the trust value for the given user id of this key.
Definition at line 148 of file kpgpkey.cpp. |
|
Set the validity values for the user ids to the validity values of the given key. This is useful after rereading a key without expensive trust checking. Definition at line 165 of file kpgpkey.cpp. References keyTrust(). |
|
Returns true if the key is valid, i.e. not revoked, expired, disabled or invalid. Definition at line 177 of file kpgpkey.cpp. |
|
Returns true if the key is a valid encryption key. The trust is not checked. Definition at line 184 of file kpgpkey.cpp. |
|
Returns true if the key is a valid signing key. The trust is not checked. Definition at line 191 of file kpgpkey.cpp. |
|
Returns the list of userIDs.
|
|
Returns the list of subkeys.
|
|
Adds a user ID with the given values to the key if uid isn't an empty string.
Definition at line 197 of file kpgpkey.cpp. Referenced by Key(). |
|
Adds the given user ID to the key.
|
|
Returns true if the given string matches one of the user IDs. The match is case sensitive if cs is true or case insensitive if cs is false. Definition at line 206 of file kpgpkey.cpp. |
|
Adds a subkey with the given values to the key if keyID isn't an empty string.
Definition at line 219 of file kpgpkey.cpp. Referenced by Key(). |
|
Adds the given subkey to the key.
|
|
Returns a pointer to the subkey with the given key ID.
Definition at line 227 of file kpgpkey.cpp. Referenced by setFingerprint(). |
|
Sets the fingerprint of the given subkey to fpr.
Definition at line 249 of file kpgpkey.cpp. References getSubkey(), and Kpgp::Subkey::setFingerprint(). |
The documentation for this class was generated from the following files: