(epa-verify): New command.
(epa-sign): New command.
(epa-encrypt): New command.
+ (epa-import-armor-in-region): New command.
+ (epa-import): New command.
2006-12-29 Daiki Ueno <ueno@unixuser.org>
(epg-context-result-for context 'import))))))
;;;###autoload
+(defun epa-import-armor-in-region (start end)
+ "Import keys in the OpenPGP armor format in the current region
+between START and END.
+
+Don't use this command in Lisp programs!"
+ (interactive "r")
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char start)
+ (let (armor-start armor-end)
+ (while (re-search-forward
+ "-----BEGIN \\(PGP \\(PUBLIC\\|PRIVATE\\) KEY BLOCK\\)-----$"
+ nil t)
+ (setq armor-start (match-beginning 0)
+ armor-end (re-search-forward
+ (concat "^-----END " (match-string 1) "-----$")
+ nil t))
+ (unless armor-end
+ (error "No armor tail"))
+ (epa-import-keys-region armor-start armor-end))))))
+
+;;;###autoload
+(defun epa-import ()
+ "Import keys in the OpenPGP armor format in the current buffer.
+
+Don't use this command in Lisp programs!"
+ (interactive)
+ (epa-import-armor-in-region (point-min) (point-max)))
+
+;;;###autoload
(defun epa-export-keys (keys file)
"Export selected KEYS to FILE.