libkpgp
Kpgp::Key Class Reference
#include <kpgpkey.h>
Detailed Description
This class is used to store information about a PGP key.
Definition at line 432 of file kpgpkey.h.
Public Member Functions | |
Key (const KeyID &keyid=KeyID(), const QString &uid=QString::null, const bool secret=false) | |
~Key () | |
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 |
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. |
Member Function Documentation
|
Adds the given subkey to the key.
|
|
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. |
|
Adds the given user ID to the key.
|
|
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. |
|
Returns true if the key can be used to certify keys.
|
|
Returns true if the key can be used to encrypt data.
|
|
Returns true if the key can be used to sign data.
|
|
Clears/resets all key data.
Definition at line 114 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. |
|
Returns the creation date of the primary subkey.
|
|
Returns true if the key has been disabled.
|
|
Returns the encryption preference for this key.
|
|
Returns true if the key has expired.
|
|
Returns a pointer to the subkey with the given key ID.
Definition at line 227 of file kpgpkey.cpp. |
|
Returns true if the key is invalid.
|
|
Returns true if there are no user IDs or no subkeys.
|
|
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 trust value for the given user id of this key.
Definition at line 148 of file kpgpkey.cpp. |
|
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. |
|
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. |
|
Returns the fingerprint of the primary key or a null string if there are no subkeys.
|
|
Returns the key ID of the primary key or a null string if there are no subkeys.
|
|
Returns the primary user ID or a null string if there are no user IDs.
|
|
Returns true if the key has been revoked.
|
|
Returns true if the key is a secret key.
|
|
Sets the flag if the key can be used to certify keys to canCertify.
|
|
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 has been disabled to disabled.
|
|
Sets the encryption preference for this key to encrPref.
|
|
Sets the flag if the key has expired to expired.
|
|
Sets the fingerprint of the given subkey to fpr.
Definition at line 249 of file kpgpkey.cpp. |
|
Sets the flag if the key is invalid to invalid.
|
|
Sets the flag if the key has been revoked to revoked.
|
|
Sets the flag if the key is a secret key to secret.
|
|
Returns the list of subkeys.
|
|
Returns the list of userIDs.
|
The documentation for this class was generated from the following files: