Function: pgg-pgp-lookup-key

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

Signature

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

Documentation

Search keys associated with STRING.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/pgg-pgp.el.gz
(defun pgg-pgp-lookup-key (string &optional _type)
  "Search keys associated with STRING."
  (let ((args (list "+batchmode" "+language=en" "-kv" string)))
    (with-current-buffer (get-buffer-create pgg-output-buffer)
      (buffer-disable-undo)
      (erase-buffer)
      (apply #'call-process pgg-pgp-program nil t nil args)
      (goto-char (point-min))
      (cond
       ((re-search-forward "^pub\\s +[0-9]+/" nil t);PGP 2.*
	(buffer-substring (point)(+ 8 (point))))
       ((re-search-forward "^Type" nil t);PGP 6.*
	(beginning-of-line 2)
	(substring
	 (nth 2 (split-string
		 (buffer-substring (point)(progn (end-of-line) (point)))))
	 2))))))