Function: pgg-gpg-lookup-key

pgg-gpg-lookup-key is a byte-compiled function defined in pgg-gpg.el.gz.

Signature

(pgg-gpg-lookup-key STRING &optional TYPE)

Documentation

Search keys associated with STRING.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/pgg-gpg.el.gz
(defun pgg-gpg-lookup-key (string &optional type)
  "Search keys associated with STRING."
  (let ((args (list "--with-colons" "--no-greeting" "--batch"
		    (if type "--list-secret-keys" "--list-keys")
		    string)))
    (with-temp-buffer
      (apply #'call-process pgg-gpg-program nil t nil args)
      (goto-char (point-min))
      (if (re-search-forward "^\\(sec\\|pub\\):[^:]*:[^:]*:[^:]*:\\([^:]*\\)"
			     nil t)
	  (substring (match-string 2) 8)))))