Gossamer Forum
Home : General : Perl Programming :

auto gernerating a password

Quote Reply
auto gernerating a password
what is the easiest way to generate a password on the fly (I don't want to store it). is it possible to generate one out of the ID or the email (maybe Contact name), send it out and verify this without needing a db-field for that?

Is it possibe to have any funktions like this:
$pw = (lenght($Email) * $ID / $Date)

Is there any function wich give back definitely one exact value?

Thanks, Chris

Quote Reply
Re: auto gernerating a password In reply to
MD5.pm..

my $length = 10;

require MD5;
my $password = MD5->hexhash(time . $$ . rand (16000));
my $password = substr ($password, 0, $length);

md5 makes random strings.. change $length to whatever to change the length of the password..

Jerry Su
Quote Reply
Re: auto gernerating a password In reply to
Thats great, it works, but is it also possible to generate a value out of anotherone (Date, E-Mail), so that I can recalculate it once more with the same output?