mellin has asked for the wisdom of the Perl Monks concerning the following question:
Before i start to dig in to it, i could use some common advices on fact of the matter. And is that above shown code the way to go?my $cleartext = whatever(); my $salt = '$1$'; $salt .= ('A' .. 'Z', 'a'..'z', '0'..'9', '.', '/')[rand 64] for 1..8; my $crypted = crypt $cleartext, $salt; # verifying password my $cleartext = whatever(); my $crypted = getfromdb(); if (crypt($cleartext, $crypted) eq $crypted) { # correct password } else { # incorrect... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Securing program executing with Md5-hash
by astroboy (Chaplain) on Oct 16, 2004 at 10:58 UTC | |
|
Re: Securing program executing with Md5-hash
by hsinclai (Deacon) on Oct 16, 2004 at 13:43 UTC |