emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master bba9917: Remove string-as-unibyte


From: Katsumi Yamaoka
Subject: [Emacs-diffs] master bba9917: Remove string-as-unibyte
Date: Wed, 24 May 2017 04:19:21 -0400 (EDT)

branch: master
commit bba9917299e3628e40462a762f2a14bb8df193f0
Author: Katsumi Yamaoka <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    Remove string-as-unibyte
    
    * lisp/gnus/canlock.el (canlock-sha1): Remove useless variable.
    (canlock-make-cancel-key): No need to use string-as-unibyte.
---
 lisp/gnus/canlock.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el
index 9e13ced..5157256 100644
--- a/lisp/gnus/canlock.el
+++ b/lisp/gnus/canlock.el
@@ -72,8 +72,7 @@ buffer does not look like a news message."
 
 (defun canlock-sha1 (message)
   "Make a SHA-1 digest of MESSAGE as a unibyte string of length 20 bytes."
-  (let (sha1-maximum-internal-length)
-    (sha1 message nil nil 'binary)))
+  (sha1 message nil nil 'binary))
 
 (defun canlock-make-cancel-key (message-id password)
   "Make a Cancel-Key header."
@@ -87,10 +86,7 @@ buffer does not look like a news message."
                           (char-to-string (logxor 92 byte)))
                         password "")))
     (base64-encode-string
-     (canlock-sha1
-      (concat opad
-             (canlock-sha1
-              (concat ipad (string-as-unibyte message-id))))))))
+     (canlock-sha1 (concat opad (canlock-sha1 (concat ipad message-id)))))))
 
 (defun canlock-narrow-to-header ()
   "Narrow the buffer to the head of the message."



reply via email to

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