Saturday 17 August 2013

Manually set rounds not working correctly in crypt()

Manually set rounds not working correctly in crypt()

I had setup a password system which had the system generate a random digit
character and use that as the rounds number for crypting a password.
It worked fine until recently when logins stopped working. After a bit of
debugging i realized that the cyrpt() function is not accepting the 4
digits anymore and instead only keeping the first 2 digits.
Example:
Generated Rounds Number:6355 Crypt output:
$6$rounds=63$jOa4lXzFPo1W120PzaHk06JjQQ0C/PvmzB6SGdtniZ3hy2OeCQ9WDf2qlFEb9lHikGJcgp7vvI1wZxX4PcJWQ/
As you can see only the first 2 digits are being kept.
Does anyone have a solution to why this suddenly changed?

No comments:

Post a Comment