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.
Constructor & Destructor Documentation
|
Constructs a new PGP key with keyid as key ID of the primary key and uid as primary user ID.
|
Member Function Documentation
|
Clears/resets all key data.
|
|
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.
|
|
Returns the key ID of the primary key or a null string if there are no subkeys.
|
|
Returns the fingerprint of the primary key or a null string if there are no subkeys.
|
|
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. |
|
Returns the trust value for the given user id of this key.
|
|
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. |
|
Returns true if the key is valid, i.e. not revoked, expired, disabled or invalid. |
|
Returns true if the key is a valid encryption key. The trust is not checked. |
|
Returns true if the key is a valid signing key. The trust is not checked. |
|
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.
|
|
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. |
|
Adds a subkey with the given values to the key if keyID isn't an empty string.
|
|
Adds the given subkey to the key.
|
|
Returns a pointer to the subkey with the given key ID.
|
|
Sets the fingerprint of the given subkey to fpr.
|
The documentation for this class was generated from the following files:
- kpgpkey.h
- kpgpkey.cpp