Function: pgg-remove-passphrase-from-cache

pgg-remove-passphrase-from-cache is a byte-compiled function defined in pgg.el.gz.

Signature

(pgg-remove-passphrase-from-cache KEY &optional NOTRUNCATE)

Documentation

Omit passphrase associated with KEY in time-limited passphrase cache.

Truncate the key to 8 trailing characters unless NOTRUNCATE is true
(default false).

This is a no-op if there is not entry for KEY (eg, it's already expired.

The memory for the passphrase is filled with underscores to clear any references to it.

Custom variables pgg-cache-passphrase and pgg-passphrase-cache-expiry regulate cache behavior.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/pgg.el.gz
(defun pgg-remove-passphrase-from-cache (key &optional notruncate)
  "Omit passphrase associated with KEY in time-limited passphrase cache.

Truncate the key to 8 trailing characters unless NOTRUNCATE is true
\(default false).

This is a no-op if there is not entry for KEY (eg, it's already expired.

The memory for the passphrase is filled with underscores to clear any
references to it.

Custom variables `pgg-cache-passphrase' and `pgg-passphrase-cache-expiry'
regulate cache behavior."
  (let* ((passphrase (pgg-read-passphrase-from-cache key notruncate))
         (key (if notruncate key (pgg-truncate-key-identifier key)))
         (interned-timer-key (intern-soft key pgg-pending-timers))
         (old-timer (symbol-value interned-timer-key)))
    (when passphrase
      (clear-string passphrase)
      (unintern key pgg-passphrase-cache))
    (when old-timer
      (cancel-timer old-timer)
      (unintern interned-timer-key pgg-pending-timers))))