Function: epg-decrypt-string
epg-decrypt-string is an autoloaded and byte-compiled function defined
in epg.el.gz.
Signature
(epg-decrypt-string CONTEXT CIPHER)
Documentation
Decrypt a string CIPHER and return the plain text.
Source Code
;; Defined in /usr/src/emacs/lisp/epg.el.gz
(defun epg-decrypt-string (context cipher)
"Decrypt a string CIPHER and return the plain text."
(let ((input-file (make-temp-file "epg-input"))
(coding-system-for-write 'binary))
(unwind-protect
(progn
(write-region cipher nil input-file nil 'quiet)
(setf (epg-context-output-file context)
(make-temp-file "epg-output"))
(epg-start-decrypt context (epg-make-data-from-file input-file))
(epg-wait-for-completion context)
(epg--check-error-for-decrypt context)
(epg-read-output context))
(epg-delete-output-file context)
(if (file-exists-p input-file)
(delete-file input-file))
(epg-reset context))))