diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-11 00:08:03 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-11 00:08:41 -0800 |
commit | 2860f6cec56b02120b0b62cb3733c00a9e5359db (patch) | |
tree | 97a920ed88c7103034edc1a979a88d8c436f2603 | |
parent | 93241242537ad18b08486d4abd00e16c225a6a30 (diff) | |
download | emacs-2860f6cec56b02120b0b62cb3733c00a9e5359db.tar.gz |
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’.
-rw-r--r-- | lisp/url/url-auth.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 1ef73a62c02..0746cfd96cb 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -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) |