Function: password-read

password-read is a byte-compiled function defined in password-cache.el.gz.

Signature

(password-read PROMPT &optional KEY)

Documentation

Read password, for use with KEY, from user, or from cache if wanted.

KEY indicate the purpose of the password, so the cache can separate passwords. The cache is not used if KEY is nil. KEY is typically a string but can be anything (compared via equal). The variable password-cache control whether the cache is used.

Probably introduced at or before Emacs version 26.1.

Source Code

;; Defined in /usr/src/emacs/lisp/password-cache.el.gz
(defun password-read (prompt &optional key)
  "Read password, for use with KEY, from user, or from cache if wanted.
KEY indicate the purpose of the password, so the cache can
separate passwords.  The cache is not used if KEY is nil.
KEY is typically a string but can be anything (compared via `equal').
The variable `password-cache' control whether the cache is used."
  (or (password-read-from-cache key)
      (read-passwd prompt)))