Question: Write a Java program to prompt the user to set up a password. The user need to enter the password twice and the two passwords

Write a Java program to prompt the user to set up a password. The user need to enter the password twice and the two passwords should match under case sensitive comparison. The password should also satisfy the following requirements:

  1. Contains at least 8 characters and at most 30 characters
  2. Contains both uppercase and lowercase letters and a number digit (0,1,,9)
  3. Contains at least one of 17 special characters (!,#,$,%,&,(,),[,],{,},+,-,=,~,_,@)
  4. Contains none of the 3000 uncommon passwords in the attached file uncommon_passwords.txt as a substring. If English characters are involved, then case insensitive comparison should be used. For example, the password ab2S$xyz is considered to contain 2s$ as a substring.

Display appropriate error messages and exit the program if the user inputs violate any of the requirements. Your program should be sufficiently efficient. That is, after the user has typed the two passwords, he/she should see the response instantly. Your program should also be reliable and secure against malicious usage.

Write a C or C++ or Java program to prompt the user to set up a password. The user need to enter the password twice and the two passwords should match under case sensitive comparison. The password should also satisfy the following requirements:

  1. Contains at least 8 characters and at most 30 characters
  2. Contains both uppercase and lowercase letters and a number digit (0,1,,9)
  3. Contains at least one of 17 special characters (!,#,$,%,&,(,),[,],{,},+,-,=,~,_,@)
  4. Contains none of the 3000 uncommon passwords in the attached file uncommon_passwords.txt as a substring. If English characters are involved, then case insensitive comparison should be used. For example, the password ab2S$xyz is considered to contain 2s$ as a substring.

Display appropriate error messages and exit the program if the user inputs violate any of the requirements. Your program should be sufficiently efficient. That is, after the user has typed the two passwords, he/she should see the response instantly. Your program should also be reliable and secure against malicious usage.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!