Possible Duplicate:
Security by Post-It

I'm looking for the shortest program that validates passwords match the requirements in the World's Worst Password Requirements List, available here.

  1. The password must be exactly 8 characters long.
  2. It must contain at least one letter, one number, and one special character.
  3. The only special characters allowed are: @ # $
  4. A special character must not be located in the first or last position.
  5. Two of the same characters sitting next to each other are considered to be a “set.” No “sets” are allowed.
  6. Avoid using names, such as your name, user ID, or the name of your company or employer.
  7. Other words that cannot be used are Texas, child, and the months of the year.
  8. A new password cannot be too similar to the previous password.
    • Example: previous password - abc#1234, acceptable new password - acb$1243
    • Characters in the first, second, and third positions cannot be identical. (abc*****)
    • Characters in the second, third, and fourth positions cannot be identical. (*bc#****)
    • Characters in the sixth, seventh, and eighth positions cannot be identical. (*****234)
  9. A password can be changed voluntarily (no Help Desk assistance needed) once in a 15-day period. If needed, the Help Desk can reset the password at any time.
  10. The previous 8 passwords cannot be reused.
  • \$\begingroup\$ similar to codegolf.stackexchange.com/questions/6203/security-by-post-it \$\endgroup\$ – karthik Jun 6 '12 at 13:27
  • 5
    \$\begingroup\$ I agree with karthik. It's not an exact duplicate, but it's close enough not to provide any additional interest and less well specified. \$\endgroup\$ – Peter Taylor Jun 6 '12 at 16:08
  • 2
    \$\begingroup\$ At the absolute least, the description needs to explain where and how the program looks up previous passwords.... \$\endgroup\$ – breadbox Jun 6 '12 at 17:41

Browse other questions tagged or ask your own question.