libkpgp
Kpgp::Key Class Reference
#include <kpgpkey.h>
List of all members.
Detailed Description
This class is used to store information about a PGP key.
Definition at line 509 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.
- Parameters:
-
| keyid | Key ID for this Key |
| uid | UID for this key (user ID) |
| secret | Is this key secret? |
Definition at line 86 of file kpgpkey.cpp.
Member Function Documentation
| void Kpgp::Key::addSubkey |
( |
const Subkey * |
subkey |
) |
[inline] |
Adds the given subkey to the key.
Definition at line 839 of file kpgpkey.h.
| 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 221 of file kpgpkey.cpp.
| void Kpgp::Key::addUserID |
( |
const UserID * |
userID |
) |
[inline] |
Adds the given user ID to the key.
Definition at line 833 of file kpgpkey.h.
| 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 199 of file kpgpkey.cpp.
| bool Kpgp::Key::canCertify |
( |
|
) |
const [inline] |
Returns true if the key can be used to certify keys.
Definition at line 725 of file kpgpkey.h.
| bool Kpgp::Key::canEncrypt |
( |
|
) |
const [inline] |
Returns true if the key can be used to encrypt data.
Definition at line 715 of file kpgpkey.h.
| bool Kpgp::Key::canSign |
( |
|
) |
const [inline] |
Returns true if the key can be used to sign data.
Definition at line 720 of file kpgpkey.h.
| void Kpgp::Key::clear |
( |
|
) |
|
Clears/resets all key data.
Definition at line 116 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 167 of file kpgpkey.cpp.
| time_t Kpgp::Key::creationDate |
( |
|
) |
const [inline] |
Returns the creation date of the primary subkey.
Definition at line 825 of file kpgpkey.h.
| bool Kpgp::Key::disabled |
( |
|
) |
const [inline] |
Returns true if the key has been disabled.
Definition at line 705 of file kpgpkey.h.
| EncryptPref Kpgp::Key::encryptionPreference |
( |
|
) |
[inline] |
Returns the encryption preference for this key.
Definition at line 770 of file kpgpkey.h.
| bool Kpgp::Key::expired |
( |
|
) |
const [inline] |
Returns true if the key has expired.
Definition at line 700 of file kpgpkey.h.
Returns a pointer to the subkey with the given key ID.
Definition at line 229 of file kpgpkey.cpp.
| bool Kpgp::Key::invalid |
( |
|
) |
const [inline] |
Returns true if the key is invalid.
Definition at line 710 of file kpgpkey.h.
| bool Kpgp::Key::isNull |
( |
|
) |
const [inline] |
Returns true if there are no user IDs or no subkeys.
Definition at line 820 of file kpgpkey.h.
| bool Kpgp::Key::isValid |
( |
|
) |
const |
Returns true if the key is valid, i.e.
not revoked, expired, disabled or invalid.
Definition at line 179 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 186 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 193 of file kpgpkey.cpp.
Returns the trust value for the given user id of this key.
Definition at line 150 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 136 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 208 of file kpgpkey.cpp.
| QByteArray Kpgp::Key::primaryFingerprint |
( |
|
) |
const [inline] |
Returns the fingerprint of the primary key or a null string if there are no subkeys.
Definition at line 800 of file kpgpkey.h.
| KeyID Kpgp::Key::primaryKeyID |
( |
|
) |
const [inline] |
Returns the key ID of the primary key or a null string if there are no subkeys.
Definition at line 790 of file kpgpkey.h.
| QString Kpgp::Key::primaryUserID |
( |
|
) |
const [inline] |
Returns the primary user ID or a null string if there are no user IDs.
Definition at line 780 of file kpgpkey.h.
| bool Kpgp::Key::revoked |
( |
|
) |
const [inline] |
Returns true if the key has been revoked.
Definition at line 695 of file kpgpkey.h.
| bool Kpgp::Key::secret |
( |
|
) |
const [inline] |
Returns true if the key is a secret key.
Definition at line 690 of file kpgpkey.h.
| void Kpgp::Key::setCanCertify |
( |
const bool |
canCertify |
) |
[inline] |
Sets the flag if the key can be used to certify keys to canCertify .
Definition at line 765 of file kpgpkey.h.
| void Kpgp::Key::setCanEncrypt |
( |
const bool |
canEncrypt |
) |
[inline] |
Sets the flag if the key can be used to encrypt data to canEncrypt .
Definition at line 755 of file kpgpkey.h.
| void Kpgp::Key::setCanSign |
( |
const bool |
canSign |
) |
[inline] |
Sets the flag if the key can be used to sign data to canSign .
Definition at line 760 of file kpgpkey.h.
| void Kpgp::Key::setDisabled |
( |
const bool |
disabled |
) |
[inline] |
Sets the flag if the key has been disabled to disabled .
Definition at line 745 of file kpgpkey.h.
| void Kpgp::Key::setEncryptionPreference |
( |
const EncryptPref |
encrPref |
) |
[inline] |
Sets the encryption preference for this key to encrPref .
Definition at line 775 of file kpgpkey.h.
| void Kpgp::Key::setExpired |
( |
const bool |
expired |
) |
[inline] |
Sets the flag if the key has expired to expired .
Definition at line 740 of file kpgpkey.h.
| void Kpgp::Key::setFingerprint |
( |
const KeyID & |
keyID, |
|
|
const QByteArray & |
fpr | |
|
) |
| | |
Sets the fingerprint of the given subkey to fpr .
Definition at line 251 of file kpgpkey.cpp.
| void Kpgp::Key::setInvalid |
( |
const bool |
invalid |
) |
[inline] |
Sets the flag if the key is invalid to invalid .
Definition at line 750 of file kpgpkey.h.
| void Kpgp::Key::setRevoked |
( |
const bool |
revoked |
) |
[inline] |
Sets the flag if the key has been revoked to revoked .
- Parameters:
-
| revoked | Whether the key is revoked or not |
- See also:
- revoked()
Definition at line 735 of file kpgpkey.h.
| void Kpgp::Key::setSecret |
( |
const bool |
secret |
) |
[inline] |
Sets the flag if the key is a secret key to secret .
- Parameters:
-
| secret | Whether this key is secret or not |
- See also:
- secret()
Definition at line 730 of file kpgpkey.h.
| const SubkeyList Kpgp::Key::subkeys |
( |
|
) |
const [inline] |
Returns the list of subkeys.
Definition at line 815 of file kpgpkey.h.
| const UserIDList Kpgp::Key::userIDs |
( |
|
) |
const [inline] |
Returns the list of userIDs.
Definition at line 810 of file kpgpkey.h.
Member Data Documentation
The documentation for this class was generated from the following files: