X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=sha1.el;h=24a3af5e01c52b885f2319dd55cf6ba42e75680a;hb=802330e14c105cc9728cd705794df87bf93b5b77;hp=61bba55da2d6c056edb0347949cce84b5831a279;hpb=3f8bb12f751ec89388823284d2358966fecf5b5d;p=elisp%2Fflim.git diff --git a/sha1.el b/sha1.el index 61bba55..24a3af5 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,12 @@ ;;; Code: +(require 'hex-util) + +(eval-when-compile + (or (fboundp 'sha1-string) + (defun sha1-string (a)))) + (defvar sha1-dl-module (if (and (fboundp 'sha1-string) (subrp (symbol-function 'sha1-string))) @@ -54,8 +62,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)