[lug] portable md5 function?
D. Stimits
stimits at idcomm.com
Tue Aug 21 14:34:39 MDT 2001
rotering at animalcules.com wrote:
>
> On Tue, Aug 21, 2001 at 11:28:13AM -0600, D. Stimits wrote:
>
> > I'm trying to find out if there is now a semi-portable (at least among
> > linux machines, probably UNIX in general) md5 sum function call
> > available.
>
> OpenSSL (as of 0.9.6a) contains functions to compute several different
> message digests, including md5.
>
> The driver for /dev/random (/usr/src/linux/drivers/char/random.c) also
> contains a commonly-available implementation of MD5.
>
> Depending on your personal boredom quotient, implementing MD5 from RFC
> 1321 without peeking at existing implementations is fun. I did this
> for a napster client I was working on (before Napster went effectively
> Tango Utah) and learned a lot about bitwise operators and how to write
> bad preprocessor macros (I stopped when I produced valid checksums for
> files >= 516 bytes assuming I'd never see an mp3 file smaller than
> that). It's only about 225 lines and it's not rocket science, so
> rolling your own is an option if you're not willing to use the PD
> implementations out there.
I might actually do this, I found the RFC, but I'm not sure yet.
D. Stimits, stimits at idcomm.com
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
More information about the LUG
mailing list