From 13ae8e74cc580f2c7bc9e26504be4e92e94703e8 Mon Sep 17 00:00:00 2001 From: shuhei Date: Sun, 18 Mar 2001 12:24:23 +0000 Subject: [PATCH] Require 'poe. (sha1-binary): Define with `defun-maybe'. (hmac-sha1-96): New function. --- hmac-sha1.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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) -- 1.7.10.4