diff options
| author | Paul Eggert | 2019-02-11 00:08:03 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-02-11 00:08:41 -0800 |
| commit | 2860f6cec56b02120b0b62cb3733c00a9e5359db (patch) | |
| tree | 97a920ed88c7103034edc1a979a88d8c436f2603 | |
| parent | 93241242537ad18b08486d4abd00e16c225a6a30 (diff) | |
| download | emacs-2860f6cec56b02120b0b62cb3733c00a9e5359db.tar.gz emacs-2860f6cec56b02120b0b62cb3733c00a9e5359db.zip | |
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'." | |||
| 192 | (defun url-digest-auth-make-cnonce () | 192 | (defun url-digest-auth-make-cnonce () |
| 193 | "Compute a new unique client nonce value." | 193 | "Compute a new unique client nonce value." |
| 194 | (base64-encode-string | 194 | (base64-encode-string |
| 195 | (apply #'format "%016x%08x%08x" (random) | 195 | (format "%016x%016x" (random) (car (encode-time nil t))) |
| 196 | (read (format-time-string "(%s %N)"))) | ||
| 197 | t)) | 196 | t)) |
| 198 | 197 | ||
| 199 | (defun url-digest-auth-nonce-count (_nonce) | 198 | (defun url-digest-auth-nonce-count (_nonce) |