I want to generate an MD5 hash of a password in the same format as is
written to /etc/shadow. All the MD5-related libraries I can find
(including the one in the standard distribution) are aimed at doing MD5
checksums of strings or files, which isn’t what I want. Can someone
suggest how to do what I want (either by using a library I haven’t
discovered yet or adapting the MD5 checksum to do it)?