emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 2860f6c: Simplify url-digest-auth-make-cnonce


From: Paul Eggert
Subject: [Emacs-diffs] master 2860f6c: Simplify url-digest-auth-make-cnonce
Date: Mon, 11 Feb 2019 03:08:46 -0500 (EST)

branch: master
commit 2860f6cec56b02120b0b62cb3733c00a9e5359db
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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’.
---
 lisp/url/url-auth.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index 1ef73a6..0746cfd 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]