Ciao Monks, it's nice to be back again in the monastery!
I have a question about basic password checking; I already took a look at Data::Password and, in the monastery, to this and this other node (I also tried SuperSearch to check in FAQ and Categorized Questions/Answers, but I got too much garbage and gave up).
What I need is to do just a minimal check, in particular:
While the first two points are really easy to code:
sub validate_password { my ($field,$pass) = @_ ; my $minlen = 5 ; return "Field $field: Password too short (min. $minlen chars)" if length($pass) < $minlen ; return "Field $field: Please use alphabetics and digits (at least)" unless $pass =~ /[a-z/i and $pass =~ /\d/ ; ...
I'm not sure how to manage the third point in a clear and efficient manner, where clear means that the code is enough readable for me to understand when I'll get back to the code after 3 months :-) and efficient is that it doesn require years to run.
I gave up Data::Password because it was too general and UNIX oriented (I'd like my program to be portable). Similarly, Authen::PAM and Crypt::Cracklib don't suit my needs
Any clues?
Ciao!
--bronto
The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
--John M. Dlugosz
In reply to Minimal password check, again by bronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |