* eword-encode.el (make-ew-rword, ew-rword-text, ew-rword-charset)
[elisp/flim.git] / sha1.el
diff --git a/sha1.el b/sha1.el
index a7265b6..6fca525 100644 (file)
--- a/sha1.el
+++ b/sha1.el
@@ -1,10 +1,8 @@
 ;;; sha1.el --- SHA1 Secure Hash Algorithm.
 
-;; Copyright (C) 1999 Shuhei KOBAYASHI
+;; Copyright (C) 1999, 2001  Free Software Foundation, Inc.
 
 ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
-;;     Kenichi OKADA <okada@opaopa.org>
-;; Maintainer: Kenichi OKADA <okada@opaopa.org>
 ;; Keywords: SHA1, FIPS 180-1
 
 ;; This file is part of FLIM (Faithful Library about Internet Message).
@@ -21,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
 
 ;;; Code:
 
-(require 'hex-util)
-
-(eval-when-compile
-  (defun-maybe sha1-string (a)))
-
 (defvar sha1-dl-module
-  (if (and (fboundp 'sha1-string)
-          (subrp (symbol-function 'sha1-string)))
-      nil
-    (if (fboundp 'dynamic-link)
-       (let ((path (expand-file-name "sha1.so" exec-directory)))
-         (and (file-exists-p path)
-              path)))))
+  (cond
+   ((and (fboundp 'sha1)
+        (subrp (symbol-function 'sha1)))
+    nil)
+   ((fboundp 'dynamic-link)
+    ;; Should we take care of `dynamic-link-path'?
+    (let ((path (expand-file-name "sha1.so" exec-directory)))
+      (if (file-exists-p path)
+         path
+       nil)))
+   (t
+    nil)))
 
 (cond
- (sha1-dl-module
-  ;; Emacs with DL patch.
+ ((and (stringp sha1-dl-module)
+       (file-exists-p sha1-dl-module))
   (require 'sha1-dl))
  (t
   (require 'sha1-el)))
 
-;; 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)
 
 ;;; sha1.el ends here