#include <kpgpkey.h>
Public Member Functions | |
Key (const KeyID &keyid=KeyID(), const TQString &uid=TQString(), 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) |
TQString | primaryUserID () const |
KeyID | primaryKeyID () const |
TQCString | primaryFingerprint () const |
bool | isNull () const |
time_t | creationDate () const |
Validity | keyTrust () const |
Validity | keyTrust (const TQString &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 TQString &uid, const Validity validity=KPGP_VALIDITY_UNKNOWN, const bool revoked=false, const bool invalid=false) |
void | addUserID (const UserID *userID) |
bool | matchesUserID (const TQString &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 TQCString &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
Constructor & Destructor Documentation
Kpgp::Key::Key | ( | const KeyID & | keyid = KeyID() , |
const TQString & | uid = TQString() , |
||
const bool | secret = false |
||
) |
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
void Kpgp::Key::addSubkey | ( | const KeyID & | keyID, |
const bool | secret = false |
||
) |
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.
void Kpgp::Key::addSubkey | ( | const Subkey * | subkey | ) | [inline] |
void Kpgp::Key::addUserID | ( | const TQString & | uid, |
const Validity | validity = KPGP_VALIDITY_UNKNOWN , |
||
const bool | revoked = false , |
||
const bool | invalid = false |
||
) |
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.
void Kpgp::Key::addUserID | ( | const UserID * | userID | ) | [inline] |
bool Kpgp::Key::canCertify | ( | ) | const [inline] |
bool Kpgp::Key::canEncrypt | ( | ) | const [inline] |
bool Kpgp::Key::canSign | ( | ) | const [inline] |
void Kpgp::Key::clear | ( | ) |
Clears/resets all key data.
Definition at line 114 of file kpgpkey.cpp.
void Kpgp::Key::cloneKeyTrust | ( | const Key * | 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.
Definition at line 165 of file kpgpkey.cpp.
time_t Kpgp::Key::creationDate | ( | ) | const [inline] |
bool Kpgp::Key::disabled | ( | ) | const [inline] |
EncryptPref Kpgp::Key::encryptionPreference | ( | ) | [inline] |
bool Kpgp::Key::expired | ( | ) | const [inline] |
Subkey * Kpgp::Key::getSubkey | ( | const KeyID & | keyID | ) |
Returns a pointer to the subkey with the given key ID.
Definition at line 227 of file kpgpkey.cpp.
bool Kpgp::Key::invalid | ( | ) | const [inline] |
bool Kpgp::Key::isNull | ( | ) | const [inline] |
bool Kpgp::Key::isValid | ( | ) | const |
Returns true if the key is valid, i.e.
not revoked, expired, disabled or invalid.
Definition at line 177 of file kpgpkey.cpp.
bool Kpgp::Key::isValidEncryptionKey | ( | ) | const |
Returns true if the key is a valid encryption key.
The trust is not checked.
Definition at line 184 of file kpgpkey.cpp.
bool Kpgp::Key::isValidSigningKey | ( | ) | const |
Returns true if the key is a valid signing key.
The trust is not checked.
Definition at line 191 of file kpgpkey.cpp.
Validity Kpgp::Key::keyTrust | ( | ) | const |
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.
Validity Kpgp::Key::keyTrust | ( | const TQString & | uid | ) | const |
Returns the trust value for the given user id of this key.
Definition at line 148 of file kpgpkey.cpp.
bool Kpgp::Key::matchesUserID | ( | const TQString & | str, |
bool | cs = true |
||
) |
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.
TQCString Kpgp::Key::primaryFingerprint | ( | ) | const [inline] |
KeyID Kpgp::Key::primaryKeyID | ( | ) | const [inline] |
TQString Kpgp::Key::primaryUserID | ( | ) | const [inline] |
bool Kpgp::Key::revoked | ( | ) | const [inline] |
bool Kpgp::Key::secret | ( | ) | const [inline] |
void Kpgp::Key::setCanCertify | ( | const bool | canCertify | ) | [inline] |
void Kpgp::Key::setCanEncrypt | ( | const bool | canEncrypt | ) | [inline] |
void Kpgp::Key::setCanSign | ( | const bool | canSign | ) | [inline] |
void Kpgp::Key::setDisabled | ( | const bool | disabled | ) | [inline] |
void Kpgp::Key::setEncryptionPreference | ( | const EncryptPref | encrPref | ) | [inline] |
void Kpgp::Key::setExpired | ( | const bool | expired | ) | [inline] |
void Kpgp::Key::setFingerprint | ( | const KeyID & | keyID, |
const TQCString & | fpr | ||
) |
Sets the fingerprint of the given subkey to fpr.
Definition at line 249 of file kpgpkey.cpp.
void Kpgp::Key::setInvalid | ( | const bool | invalid | ) | [inline] |
void Kpgp::Key::setRevoked | ( | const bool | revoked | ) | [inline] |
void Kpgp::Key::setSecret | ( | const bool | secret | ) | [inline] |
const SubkeyList Kpgp::Key::subkeys | ( | ) | const [inline] |
const UserIDList Kpgp::Key::userIDs | ( | ) | const [inline] |
The documentation for this class was generated from the following files: