Function: epg-start-decrypt
epg-start-decrypt is a byte-compiled function defined in epg.el.gz.
Signature
(epg-start-decrypt CONTEXT CIPHER)
Documentation
Initiate a decrypt operation on CIPHER.
CIPHER must be a file data object.
If you use this function, you will need to wait for the completion of
epg-gpg-program by using epg-wait-for-completion and call
epg-reset to clear a temporary output file.
If you are unsure, use synchronous version of this function
epg-decrypt-file or epg-decrypt-string instead.
Source Code
;; Defined in /usr/src/emacs/lisp/epg.el.gz
(defun epg-start-decrypt (context cipher)
"Initiate a decrypt operation on CIPHER.
CIPHER must be a file data object.
If you use this function, you will need to wait for the completion of
`epg-gpg-program' by using `epg-wait-for-completion' and call
`epg-reset' to clear a temporary output file.
If you are unsure, use synchronous version of this function
`epg-decrypt-file' or `epg-decrypt-string' instead."
(unless (epg-data-file cipher)
(error "Not a file"))
(setf (epg-context-operation context) 'decrypt)
(setf (epg-context-result context) nil)
(epg--start context (list "--decrypt" "--" (epg-data-file cipher)))
;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
(unless (eq (epg-context-protocol context) 'CMS)
(epg-wait-for-status context '("BEGIN_DECRYPTION"))))