The Crypt docco says:
Traditionally the result is a string of 13 bytes: two first bytes of the salt, followed by 11 bytes from the set ./0-9A-Za-z, and only the first eight bytes of the encrypted string mattered, but alternative hashing schemes (like MD5), higher level security schemes (like C2), and implementations on non-UNIX platforms may produce different strings.
So I would expect test1234 to crypt to the same as test12345 but not test123. Here is some test code showing just that behaviour:
I used a constant salt just to keep things simple. Are you using Unicode so that 8 bytes is less characters ? I see enyas (sp?) in your code like the one here print $fh "$userñ$pass";nph>perl -ne'BEGIN{print "Pass: "}; $S="ab"; print crypt($_, $S), "\nP +ass: "' Pass: test abpNYMT5RGuX6 Pass: test1 abW8wbI6pkG9g Pass: test12 abP627jOqenSg Pass: test123 abpwNzBDeyy9Y Pass: test1234 abP/cckPJaUqA Pass: test12345 abP/cckPJaUqA Pass: test123456 abP/cckPJaUqA Pass:
Cheers,
R.
In reply to Re: crypt help
by Random_Walk
in thread crypt help
by dave_pl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |