Simplify url-digest-auth-make-cnonce

* lisp/url/url-auth.el (url-digest-auth-make-cnonce):
Simplify by using encode-time instead of round-tripping
through a format-time-string and ‘read’.
This commit is contained in:
Paul Eggert 2019-02-11 00:08:03 -08:00
parent 9324124253
commit 2860f6cec5

View file

@ -192,8 +192,7 @@ key cache `url-digest-auth-storage'."
(defun url-digest-auth-make-cnonce ()
"Compute a new unique client nonce value."
(base64-encode-string
(apply #'format "%016x%08x%08x" (random)
(read (format-time-string "(%s %N)")))
(format "%016x%016x" (random) (car (encode-time nil t)))
t))
(defun url-digest-auth-nonce-count (_nonce)