pmme has asked for the wisdom of the Perl Monks concerning the following question:
Hi all
I have been using the following script to create passwords for user accounts, and just got my wrists slapped because it is not creating md5 passwords, instead, its just creating plain crypt passwords.
Help would be much apprecaited.
I have been using the following script to create passwords for user accounts, and just got my wrists slapped because it is not creating md5 passwords, instead, its just creating plain crypt passwords.
I have looked into Digest::MD5, but i am lost on how to use it.my @chars = ('a'..'z', 'A'..'Z', 0..9); my $password = do {{ local $_ = join "" => map {$chars [rand @chars]} 1..8; redo unless /[a-z]/ && /[A-Z]/ && /\d/; $_; }}; my $salt = join '', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]; my $encrpass = crypt($password, $salt);
Help would be much apprecaited.
Back to
Seekers of Perl Wisdom