From: shuhei Date: Sun, 18 Mar 2001 12:24:23 +0000 (+0000) Subject: Require 'poe. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13ae8e74cc580f2c7bc9e26504be4e92e94703e8;p=elisp%2Fflim.git Require 'poe. (sha1-binary): Define with `defun-maybe'. (hmac-sha1-96): New function. --- diff --git a/hmac-sha1.el b/hmac-sha1.el index ab4f109..da8bde0 100644 --- a/hmac-sha1.el +++ b/hmac-sha1.el @@ -66,15 +66,14 @@ (eval-when-compile (require 'hmac-def)) (require 'hex-util) ; (decode-hex-string STRING) (require 'sha1) ; expects (sha1 STRING) +(require 'poe) -;;; For consintency with hmac-md5.el, we define this function here. -(or (fboundp 'sha1-binary) - (defun sha1-binary (string) - "Return the SHA1 of STRING in binary form." - (decode-hex-string (sha1 string)))) +(defun-maybe sha1-binary (string) + "Return the SHA1 of STRING in binary form." + (decode-hex-string (sha1 string))) (define-hmac-function hmac-sha1 sha1-binary 64 20) ; => (hmac-sha1 TEXT KEY) -;; (define-hmac-function hmac-sha1-96 sha1-binary 64 20 96) +(define-hmac-function hmac-sha1-96 sha1-binary 64 20 96) (provide 'hmac-sha1)