diff options
Diffstat (limited to '')
-rw-r--r-- | gpgcontext.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gpgcontext.cpp b/gpgcontext.cpp index a388199..55902d7 100644 --- a/gpgcontext.cpp +++ b/gpgcontext.cpp @@ -718,6 +718,33 @@ QString GpgContext::beautifyFingerprint(QString fingerprint) return fingerprint; } +/** + * note: privkey status is not returned + */ +GpgKey GpgContext::getKeyByFpr(QString fpr) { + + GpgKeyList list = this->listKeys(); + foreach (GpgKey key, list) { + if(key.fpr == fpr) { + return key; + } + } +} + + +/** + * note: privkey status is not returned + */ +GpgKey GpgContext::getKeyById(QString id) { + + GpgKeyList list = this->listKeys(); + foreach (GpgKey key, list) { + if(key.id == id) { + return key; + } + } +} + } |