1 ;;; md5.el --- MD5 Message Digest Algorithm.
3 ;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
5 ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
6 ;; Keywords: MD5, RFC 1321
8 ;; This file is part of FLIM (Faithful Library about Internet Message).
10 ;; This program is free software; you can redistribute it and/or
11 ;; modify it under the terms of the GNU General Public License as
12 ;; published by the Free Software Foundation; either version 2, or
13 ;; (at your option) any later version.
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with this program; see the file COPYING. If not, write to
22 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
27 ;; Test cases from RFC 1321.
30 ;; => d41d8cd98f00b204e9800998ecf8427e
33 ;; => 0cc175b9c0f1b6a831c399e269772661
36 ;; => 900150983cd24fb0d6963f7d28e17f72
38 ;; (md5 "message digest")
39 ;; => f96b697d7cb7938d525a2f31aaf161d0
41 ;; (md5 "abcdefghijklmnopqrstuvwxyz")
42 ;; => c3fcd3d76192e4007dfb496cca67e13b
44 ;; (md5 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
45 ;; => d174ab98d277d9f5a5611c2c9f419d9f
47 ;; (md5 "12345678901234567890123456789012345678901234567890123456789012345678901234567890")
48 ;; => 57edf4a22be3c955ac49da2e2107b67a
55 (subrp (symbol-function 'md5)))
57 ((fboundp 'dynamic-link)
58 ;; Should we take care of `dynamic-link-path'?
59 (let ((path (expand-file-name "md5.so" exec-directory)))
60 (if (file-exists-p path)
68 (subrp (symbol-function 'md5)))
71 ((and (stringp md5-dl-module)
72 (file-exists-p md5-dl-module))