X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mail%2Fhmac-sha1.el;h=00fe338c86c2637c344ff4fc9a7e8b52b2dc328e;hb=refs%2Ftags%2FEmacs-21_0_100-shuhei-2001-02-26;hp=6b2beeaf1479caff6f758edcf72c9abe9a83e7ce;hpb=8b4ba702b335ba2eec6e281c0d3c5c8b2bc1723a;p=elisp%2Flemi.git diff --git a/mail/hmac-sha1.el b/mail/hmac-sha1.el index 6b2beea..00fe338 100644 --- a/mail/hmac-sha1.el +++ b/mail/hmac-sha1.el @@ -1,6 +1,6 @@ ;;; hmac-sha1.el --- Compute HMAC-SHA1. -;; Copyright (C) 1999 Shuhei KOBAYASHI +;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI ;; Keywords: HMAC, RFC 2104, HMAC-SHA1, SHA1, Cancel-Lock @@ -44,6 +44,7 @@ ;; (encode-hex-string ;; (hmac-sha1 "Test With Truncation" (make-string 20 ?\x0c))) ;; => "4c1a03424b55e07fe7f27be1d58bb9324a9a5a04" +;; ;; (encode-hex-string ;; (hmac-sha1-96 "Test With Truncation" (make-string 20 ?\x0c))) ;; => "4c1a03424b55e07fe7f27be1" @@ -64,13 +65,11 @@ (eval-when-compile (require 'hmac-def)) (require 'hex-util) ; (decode-hex-string STRING) -(require 'sha1) ; expects (sha1 STRING) +(require 'sha1) ; expects (sha1-binary STRING) -;;; 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 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)