From: okada Date: Mon, 22 Nov 1999 21:35:40 +0000 (+0000) Subject: compatibility for sha1.el by Keiichi Suzuki. X-Git-Tag: slim-1_13_4~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c14bf4d9a6d6e62d00a58a1b5c6c16f97c718d96;p=elisp%2Fflim.git compatibility for sha1.el by Keiichi Suzuki. sha1.el (sha1-encode): Fix and define as obsolete function. (sha1-encode-binary): Ditto. --- diff --git a/ChangeLog b/ChangeLog index 23c2721..f60d7a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1999-10-23 Kenichi OKADA + * sha1.el (sha1-encode): Fix and define as obsolete function. + (sha1-encode-binary): Ditto. + +1999-10-23 Kenichi OKADA + * sha1.el (sha1-encode): New alias. (sha1-encode-binary): Ditto. diff --git a/sha1.el b/sha1.el index 61bba55..ad25316 100644 --- a/sha1.el +++ b/sha1.el @@ -3,6 +3,8 @@ ;; Copyright (C) 1999 Shuhei KOBAYASHI ;; Author: Shuhei KOBAYASHI +;; Kenichi OKADA +;; Maintainer: Kenichi OKADA ;; Keywords: SHA1, FIPS 180-1 ;; This file is part of FLIM (Faithful Library about Internet Message). @@ -38,6 +40,8 @@ ;;; Code: +(require 'hex-util) + (defvar sha1-dl-module (if (and (fboundp 'sha1-string) (subrp (symbol-function 'sha1-string))) @@ -54,8 +58,16 @@ (t (require 'sha1-el))) -(defalias 'sha1-encode 'sha1-string) -(defalias 'sha1-encode-binary 'sha1-string) +;; compatibility for another sha1.el by Keiichi Suzuki. +(defun sha1-encode (string) + (decode-hex-string + (sha1-string string))) +(defun sha1-encode-binary (string) + (decode-hex-string + (sha1-string string))) + +(make-obsolete 'sha1-encode "It's old API.") +(make-obsolete 'sha1-encode-binary "It's old API.") (provide 'sha1)