Function: auth-source-epa-make-gpg-token
auth-source-epa-make-gpg-token is a byte-compiled function defined in
auth-source.el.gz.
Signature
(auth-source-epa-make-gpg-token SECRET FILE)
Source Code
;; Defined in /usr/src/emacs/lisp/auth-source.el.gz
(defun auth-source-epa-make-gpg-token (secret file)
(let ((context (epg-make-context 'OpenPGP))
(pp-escape-newlines nil)
cipher)
(setf (epg-context-armor context) t)
(epg-context-set-passphrase-callback
context
(cons #'auth-source-token-passphrase-callback-function
file))
(setq cipher (epg-encrypt-string context secret nil))
(with-temp-buffer
(insert cipher)
(base64-encode-region (point-min) (point-max) t)
(concat "gpg:" (buffer-substring-no-properties
(point-min)
(point-max))))))