Calculating a cryptographic MD5 hash

T

Tim Bates

Hi folks,
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)?

Tim.
 
C

Ceri Storey

Hi folks,
I want to generate an MD5 hash of a password in the same format as is
written to /etc/shadow.

As far as I can see, you have two options. You can either port re-write
the algorithm (to be found here[0]) in ruby using Digest::MD5.
Alternatively, you could create a small C wrapper around the existing
implemenation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top