aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-05-19 20:30:58 +0200
committerLars Ingebrigtsen2019-05-19 20:30:58 +0200
commitd4af2f3001fea2d9ea46facaf26d3330bd8626e2 (patch)
tree297ee1bdf93dfc843c1ae82390d79b43874a1f31 /lisp
parentfac11d899be24fa031c360fd20c038b9432853ec (diff)
downloademacs-d4af2f3001fea2d9ea46facaf26d3330bd8626e2.tar.gz
emacs-d4af2f3001fea2d9ea46facaf26d3330bd8626e2.zip
rfc2104.el: Remove XEmacs compat code.
* lisp/net/rfc2104.el (rfc2104-string-make-unibyte): Remove XEmacs compat code.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/rfc2104.el12
1 files changed, 2 insertions, 10 deletions
diff --git a/lisp/net/rfc2104.el b/lisp/net/rfc2104.el
index 68c35aa3130..9d4957ddb5d 100644
--- a/lisp/net/rfc2104.el
+++ b/lisp/net/rfc2104.el
@@ -84,14 +84,6 @@
84 (setq ls (cdr ls))) 84 (setq ls (cdr ls)))
85 v)) 85 v))
86 86
87(eval-when-compile
88 (defmacro rfc2104-string-make-unibyte (string)
89 "Return the unibyte equivalent of STRING.
90In XEmacs return just STRING."
91 (if (featurep 'xemacs)
92 string
93 `(string-make-unibyte ,string))))
94
95(defun rfc2104-hash (hash block-length hash-length key text) 87(defun rfc2104-hash (hash block-length hash-length key text)
96 (let* (;; if key is longer than B, reset it to HASH(key) 88 (let* (;; if key is longer than B, reset it to HASH(key)
97 (key (if (> (length key) block-length) 89 (key (if (> (length key) block-length)
@@ -107,7 +99,7 @@ In XEmacs return just STRING."
107 (aset ipad i (logxor rfc2104-ipad c)) 99 (aset ipad i (logxor rfc2104-ipad c))
108 (aset opad i (logxor rfc2104-opad c))) 100 (aset opad i (logxor rfc2104-opad c)))
109 ;; Perform inner hash. 101 ;; Perform inner hash.
110 (setq partial (rfc2104-string-make-unibyte 102 (setq partial (string-make-unibyte
111 (funcall hash (concat ipad text)))) 103 (funcall hash (concat ipad text))))
112 ;; Pack latter part of opad. 104 ;; Pack latter part of opad.
113 (cl-do ((r 0 (+ 2 r)) 105 (cl-do ((r 0 (+ 2 r))
@@ -117,7 +109,7 @@ In XEmacs return just STRING."
117 (+ (* 16 (aref rfc2104-nybbles (aref partial r))) 109 (+ (* 16 (aref rfc2104-nybbles (aref partial r)))
118 ( aref rfc2104-nybbles (aref partial (1+ r)))))) 110 ( aref rfc2104-nybbles (aref partial (1+ r))))))
119 ;; Perform outer hash. 111 ;; Perform outer hash.
120 (rfc2104-string-make-unibyte (funcall hash opad)))) 112 (string-make-unibyte (funcall hash opad))))
121 113
122(provide 'rfc2104) 114(provide 'rfc2104)
123 115