diff options
| author | Katsumi Yamaoka | 2017-05-24 08:18:52 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2017-05-24 08:18:52 +0000 |
| commit | bba9917299e3628e40462a762f2a14bb8df193f0 (patch) | |
| tree | 76bd4ce227d2f8dc91be7f8bef7ba0db772dc4e3 | |
| parent | 61ef5c612d05d62b2190870ea7289251c3e092c6 (diff) | |
| download | emacs-bba9917299e3628e40462a762f2a14bb8df193f0.tar.gz emacs-bba9917299e3628e40462a762f2a14bb8df193f0.zip | |
Remove string-as-unibyte
* lisp/gnus/canlock.el (canlock-sha1): Remove useless variable.
(canlock-make-cancel-key): No need to use string-as-unibyte.
| -rw-r--r-- | lisp/gnus/canlock.el | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el index 9e13ced4670..5157256594d 100644 --- a/lisp/gnus/canlock.el +++ b/lisp/gnus/canlock.el | |||
| @@ -72,8 +72,7 @@ buffer does not look like a news message." | |||
| 72 | 72 | ||
| 73 | (defun canlock-sha1 (message) | 73 | (defun canlock-sha1 (message) |
| 74 | "Make a SHA-1 digest of MESSAGE as a unibyte string of length 20 bytes." | 74 | "Make a SHA-1 digest of MESSAGE as a unibyte string of length 20 bytes." |
| 75 | (let (sha1-maximum-internal-length) | 75 | (sha1 message nil nil 'binary)) |
| 76 | (sha1 message nil nil 'binary))) | ||
| 77 | 76 | ||
| 78 | (defun canlock-make-cancel-key (message-id password) | 77 | (defun canlock-make-cancel-key (message-id password) |
| 79 | "Make a Cancel-Key header." | 78 | "Make a Cancel-Key header." |
| @@ -87,10 +86,7 @@ buffer does not look like a news message." | |||
| 87 | (char-to-string (logxor 92 byte))) | 86 | (char-to-string (logxor 92 byte))) |
| 88 | password ""))) | 87 | password ""))) |
| 89 | (base64-encode-string | 88 | (base64-encode-string |
| 90 | (canlock-sha1 | 89 | (canlock-sha1 (concat opad (canlock-sha1 (concat ipad message-id))))))) |
| 91 | (concat opad | ||
| 92 | (canlock-sha1 | ||
| 93 | (concat ipad (string-as-unibyte message-id)))))))) | ||
| 94 | 90 | ||
| 95 | (defun canlock-narrow-to-header () | 91 | (defun canlock-narrow-to-header () |
| 96 | "Narrow the buffer to the head of the message." | 92 | "Narrow the buffer to the head of the message." |