[lug] portable md5 function?
Alan Robertson
alanr at unix.sh
Tue Aug 21 17:49:32 MDT 2001
"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. The original crypt() one-way hash does not use md5, but most
> of the linux distro's now use md5 (or make it available) for passwords.
> Is this possibly built into the libpam library? I'm trying to find a C
> function call to do this, without invoking a "system()" call.
Try this one. It works for me ;-)
http://cvs.linux-ha.org/viewcvs/viewcvs.cgi/~checkout~/linux-ha/lib/plugins/HBauth/md5.c?rev=1.1&content-type=text/plain
Sorry for the funky URL, but that's viewcvs for ya.
There's also a crc and an md5 algorithm in the same directory:
http://cvs.linux-ha.org/viewcvs/viewcvs.cgi/linux-ha/lib/plugins/HBauth/#dirlist
It's got some boilerplate for a plugin loading system that we use, but it's
easy to see what to call for the MD5 function if you want.
-- Alan Robertson
alanr at unix.sh
-- Alan Robertson
alanr at unix.sh
More information about the LUG
mailing list