* pgg-pgp.el (pgg-pgp-decrypt-region): Use passphrase cache.
This commit is contained in:
parent
20051b27ad
commit
710f2e1b90
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-01-21 Derek Atkins <warlord@MIT.EDU> (tiny change)
|
||||
|
||||
* pgg-pgp.el (pgg-pgp-decrypt-region): Use passphrase cache.
|
||||
|
||||
2005-10-08 Simon Josefsson <jas@extundo.com>
|
||||
|
||||
* pgg-parse.el (top-level): Don't require custom, it is
|
||||
|
|
|
@ -149,14 +149,16 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
|
|||
(defun pgg-pgp-decrypt-region (start end)
|
||||
"Decrypt the current region between START and END."
|
||||
(let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
|
||||
(key (pgg-pgp-lookup-key pgg-pgp-user-id 'encrypt))
|
||||
(passphrase
|
||||
(pgg-read-passphrase
|
||||
(format "PGP passphrase for %s: " pgg-pgp-user-id)
|
||||
(pgg-pgp-lookup-key pgg-pgp-user-id 'encrypt)))
|
||||
(format "PGP passphrase for %s: " pgg-pgp-user-id) key))
|
||||
(args
|
||||
'("+verbose=1" "+batchmode" "+language=us" "-f")))
|
||||
(pgg-pgp-process-region start end passphrase pgg-pgp-program args)
|
||||
(pgg-process-when-success nil)))
|
||||
(pgg-process-when-success
|
||||
(if pgg-cache-passphrase
|
||||
(pgg-add-passphrase-cache key passphrase)))))
|
||||
|
||||
(defun pgg-pgp-sign-region (start end &optional clearsign)
|
||||
"Make detached signature from text between START and END."
|
||||
|
|
Loading…
Add table
Reference in a new issue