[pg-cvs] CVS update: pg/sysdep.lisp

Eric Marsden emarsden at common-lisp.net
Sun Jul 17 15:46:33 UTC 2005


Update of /project/pg/cvsroot/pg
In directory common-lisp.net:/tmp/cvs-serv8991

Modified Files:
	sysdep.lisp 
Log Message:
Use the updated MD5 code, that operates on octet arrays rather than
strings. 

Date: Sun Jul 17 17:46:32 2005
Author: emarsden

Index: pg/sysdep.lisp
diff -u pg/sysdep.lisp:1.8 pg/sysdep.lisp:1.9
--- pg/sysdep.lisp:1.8	Sun Jul 17 15:46:50 2005
+++ pg/sysdep.lisp	Sun Jul 17 17:46:32 2005
@@ -1,6 +1,6 @@
 ;;; sysdep.lisp -- system-dependent parts of pg-dot-lisp
 ;;;
-;;; Author: Eric Marsden <emarsden at laas.fr>
+;;; Author: Eric Marsden <eric.marsden at free.fr>
 ;;; Time-stamp: <2005-07-17 emarsden>
 ;;
 ;;
@@ -11,11 +11,10 @@
   #+allegro (require :socket)
   #+lispworks (require "comm")
   #+cormanlisp (require :sockets)
-  #+sbcl (progn (require :asdf) (require :sb-bsd-sockets) (require :sb-md5))
+  #+sbcl (require :sb-bsd-sockets)
   #+(and mcl (not openmcl)) (require "OPENTRANSPORT"))
 
 
-
 (defmacro %sysdep (desc &rest forms)
   (when (null forms)
     (error "No system dependent code to ~A" desc))
@@ -44,8 +43,9 @@
 
 (defun md5-digest (string &rest strings)
   (declare (type simple-string string))
-  (let ((vec (md5:md5sum-sequence
-              (apply #'concatenate 'string string strings))))
+  (let ((vec (md5sum-sequence
+              (map '(vector (unsigned-byte 8)) #'char-code 
+                   (apply #'concatenate 'string string strings)))))
     (format nil "~(~{~2,'0X~}~)" (coerce vec 'list))))
 
 (defun md5-encode-password (user password salt)




More information about the Pg-cvs mailing list