/[pg]/pg/sysdep.lisp
ViewVC logotype

Diff of /pg/sysdep.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.5