From 21b1bbcb80d42f4be297da64a863c1918ef650b0 Mon Sep 17 00:00:00 2001 From: Maciej Pasternacki Date: Wed, 26 Nov 2008 00:38:10 +0100 Subject: [PATCH] - New fn HEX-MD5 --- src/common.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common.lisp b/src/common.lisp index c642f74..863fabd 100644 --- a/src/common.lisp +++ b/src/common.lisp @@ -14,7 +14,7 @@ #:unless-null #:null-or #:invoke-sendmail #:report-error #:report-error-by-email #:report-error-to-file #:format-error-report #:*error-context-hook* #:*error-report-pathname-defaults* - #:make-keyword #:named-lambda #:random-string #:salted-password + #:make-keyword #:named-lambda #:random-string #:salted-password #:hex-md5 #:*handler-package* #:handler-function #:start-hunchentoot)) @@ -330,6 +330,12 @@ implementations." (cl-base64:usb8-array-to-base64-string (md5:md5sum-sequence (concatenate 'string salt password)))) +(defun hex-md5 (sequence) + "Return MD5 checksum of SEQUENCE as a hexadecimal string." + (format nil "~(~{~2,'0x~}~)" + (coerce (md5:md5sum-sequence sequence) + 'list))) + (defvar *handler-package* nil "Package, in which HANDLER-FUNCTION looks for handlers. -- 2.11.4.GIT