Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2015-11-27 13:32 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (729 votes), past polls