[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: password generator



Grumble.  Someday I will learn not to make last-minute changes before
sending...

> sub make_passwd {
>     my $pass;
>     do {
> 	$pass = "";
> 	$pass .= $passwd_chars[rand(scalar(@passwd_chars))]
> 	    while length($pass) < 8;
>     } while (! &passwd::goodenough($pass));
>     return ($pass, crypt($pass,   $passwd_salt[rand(scalar(@passwd_salt))]
> 				. $passwd_salt[rand(scalar(@passwd_salt))]);
> }

-- 
Hallvard