Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: [SOLVED]- FOUND OTHER DOCUMENTATION Encrypting a password to MD5

by zentara (Archbishop)
on Nov 13, 2012 at 12:16 UTC ( #1003597=note: print w/replies, xml ) Need Help??

in reply to [SOLVED]- FOUND OTHER DOCUMENTATION Encrypting a password to MD5

Is your problem solved? You never did show the code that solved your problem. If not, see encryption confusion, you need to get the salt values, on linux it is in /etc/shadow.

This super simple example shows the basics:

#!/usr/bin/perl use warnings; use strict; print "Standard crypt output\n"; print crypt("password","sa"), "\n"; #glibc's implementation that takes care of this. Since perl on # Linux uses glibc, you get this automagically. When the salt looks li +ke # $1$...., it will encrypt the password using MD5. e.g. print "MD5 crypt output\n"; print crypt("password","\$1the_salt\$"), "\n"; print "SHA crypt output\n"; print crypt("password","\$2the_salt\$"), "\n";

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: [SOLVED]- FOUND OTHER DOCUMENTATION Encrypting a password to MD5
  • Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003597]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-03-01 21:27 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (429 votes). Check out past polls.