From: R. M. <rm...@mh...> - 2005-05-13 14:15:08
|
On Fri, 13 May 2005 14:39:30 +0100, Christophe Rhodes wrote: > "R. Mattes" <rm...@mh...> writes: > >> (equal (format nil "~(~{~2,'0X~}~)" (coerce (sb-md5:md5sum-sequence a-string) 'list)) >> (format nil "~(~{~2,'0X~}~)" (coerce (sb-md5:md5sum-sequence b-string) 'list))))) > > According to http://www.sbcl.org/manual/sb-md5.html#sb-md5, > md5sum-sequence works on vectors of (unsigned-byte 8), not on strings. > If you're hashing strings, use md5sum-string. (This was alluded to in > the NEWS file for sbcl-0.8.19) > > I'll see if I can't convince it to give you a useful error message in > future revisions. Hmm, so now we have a small but important semantic difference between sb-md5:md5sum-sequence and md5:md5sum-sequence. And, since (typep "string" 'sequence) is true it makes conditional code rather more elaborate than necessary. What's the design rationale behind this? After all strings _are_ sequences. The "mysterious" thing is that md5sum-sequence does provide a result (and doesn't throw a condition) - just a strange one. Given the use of md5 in security relevant code i'm a bit worried. Thanks RalfD > Cheers, > > Christophe > > > ------------------------------------------------------- This SF.Net > email is sponsored by Oracle Space Sweepstakes Want to be the first > software developer in space? Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click |