* pgg-epg.el (pgg-epg-lookup-key): New function.
authorueno <ueno>
Sat, 2 Sep 2006 00:26:57 +0000 (00:26 +0000)
committerueno <ueno>
Sat, 2 Sep 2006 00:26:57 +0000 (00:26 +0000)
ChangeLog
pgg-epg.el

index 6f659a3..7390bb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-09-02  Daiki Ueno  <ueno@unixuser.org>
+
+       * pgg-epg.el (pgg-epg-lookup-key): New function.
+
 2006-07-29  Daiki Ueno  <ueno@unixuser.org>
 
        * EasyPG: Version 0.0.4 released.
index 055157e..09f69f0 100644 (file)
@@ -265,6 +265,12 @@ Add all public keys in region between START and END to the keyring."
               "From unknown user")))
     "From unknown user"))
 
+(defun pgg-epg-lookup-key (string &optional type)
+  "Search keys associated with STRING."
+  (mapcar (lambda (key)
+           (epg-sub-key-id (car (epg-key-sub-key-list key))))
+         (epg-list-keys (epg-make-context) string (not (null type)))))
+
 (provide 'pgg-epg)
 
 ;;; pgg-epg.el ends here