libkpgp
#include <kpgpkey.h>
Public Member Functions | |
Key (const KeyID &keyid=KeyID(), const QString &uid=QString(), const bool secret=false) | |
~Key () | |
void | addSubkey (const KeyID &keyID, const bool secret=false) |
void | addSubkey (const Subkey *subkey) |
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 | canCertify () const |
bool | canEncrypt () const |
bool | canSign () const |
void | clear () |
void | cloneKeyTrust (const Key *key) |
time_t | creationDate () const |
bool | disabled () const |
EncryptPref | encryptionPreference () |
bool | expired () const |
Subkey * | getSubkey (const KeyID &keyID) |
bool | invalid () const |
bool | isNull () const |
bool | isValid () const |
bool | isValidEncryptionKey () const |
bool | isValidSigningKey () const |
Validity | keyTrust () const |
Validity | keyTrust (const QString &uid) const |
bool | matchesUserID (const QString &str, bool cs=true) |
QByteArray | primaryFingerprint () const |
KeyID | primaryKeyID () const |
QString | primaryUserID () const |
bool | revoked () const |
bool | secret () const |
void | setCanCertify (const bool canCertify) |
void | setCanEncrypt (const bool canEncrypt) |
void | setCanSign (const bool canSign) |
void | setDisabled (const bool disabled) |
void | setEncryptionPreference (const EncryptPref encrPref) |
void | setExpired (const bool expired) |
void | setFingerprint (const KeyID &keyID, const QByteArray &fpr) |
void | setInvalid (const bool invalid) |
void | setRevoked (const bool revoked) |
void | setSecret (const bool secret) |
const SubkeyList | subkeys () const |
const UserIDList | userIDs () const |
Protected Attributes | |
bool | mCanCertify: 1 |
bool | mCanEncrypt: 1 |
bool | mCanSign: 1 |
bool | mDisabled: 1 |
EncryptPref | mEncryptPref |
bool | mExpired: 1 |
bool | mInvalid: 1 |
bool | mRevoked: 1 |
bool | mSecret: 1 |
SubkeyList | mSubkeys |
UserIDList | mUserIDs |
Detailed Description
Constructor & Destructor Documentation
|
explicit |
Constructs a new PGP key with keyid
as key ID of the primary key and uid
as primary user ID.
Definition at line 87 of file kpgpkey.cpp.
Kpgp::Key::~Key | ( | ) |
Definition at line 107 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 222 of file kpgpkey.cpp.
|
inline |
void Kpgp::Key::addUserID | ( | const QString & | 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 200 of file kpgpkey.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
void Kpgp::Key::clear | ( | ) |
Clears/resets all key data.
Definition at line 117 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 168 of file kpgpkey.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
Returns a pointer to the subkey with the given key ID.
Definition at line 230 of file kpgpkey.cpp.
|
inline |
|
inline |
bool Kpgp::Key::isValid | ( | ) | const |
Returns true if the key is valid, i.e.
not revoked, expired, disabled or invalid.
Definition at line 180 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 187 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 194 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 137 of file kpgpkey.cpp.
Validity Kpgp::Key::keyTrust | ( | const QString & | uid | ) | const |
Returns the trust value for the given user id of this key.
Definition at line 151 of file kpgpkey.cpp.
bool Kpgp::Key::matchesUserID | ( | const QString & | 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 209 of file kpgpkey.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Kpgp::Key::setFingerprint | ( | const KeyID & | keyID, |
const QByteArray & | fpr | ||
) |
Sets the fingerprint of the given subkey to fpr .
Definition at line 252 of file kpgpkey.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Member Data Documentation
|
protected |
|
protected |
|
protected |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.