Question

In: Computer Science

For a given password system, calculate the search space for a general user and a lazy...

For a given password system, calculate the search space for a general user and a lazy user. Suppose only 11 special characters can be input. Program in java.  

Input (by the evaluator):

1st line: number of characters

2nd line: numbers allowed [Y/N]? must be included [Y/N]?

3rd line: letters allowed [Y/N]? case sensitive [Y/N]? must be included [Y/N]?

4th line: special character allowed [Y/N]? must be included [Y/N}

Solutions

Expert Solution

Program Approach:

Import essential packages to get a standard I/O.

Define a main class.

Inside a main class characterize a main function.

Inside a main function utilize scanner class to peruse input given by client.

Taking a whole number contribution from client utilizing scanner class.

Declare string and Boolean sort factors.

Allot the Boolean factors to false.

Take first character contributions from client utilizing scanner class object and utilize if explanation to check the information is substantial or not.

Take second character contribution from client utilizing scanner class object and utilize if statement to check the info is substantial or not.

Take third character contribution from client utilizing scanner class object and utilize if statement to check the information is legitimate or not.

Call a function to generatePassword to show the search space for general client as output.

Call a function to generatePassword to show the search space for apathetic client as output.

Characterize a function generatePasswoed. Inside the function declare string variable and allotting the capital letters, announce string variable and doling out the small letters, declare string variable and relegating the exceptional characters, announce string variable and appointing the numbers, string variable to consolidate characters.

Use if statement to:

Check for letters in order when there is no case delicate and consolidate the capital and lower case letters.

Check for letters in order when there is case delicate.

Check for the uncommon characters.

Check for the numbers.

Make an article irregular of Random class to create arbitrary secret key.

Make an exhibit 'secret key' of size n.

Utilizing circle to show the iterative explanations.

Joining the characters for example letters, uncommon characters and numbers to create secret key.

At long last, show the secret key as the yield.

Program

Output


Related Solutions

Description: The search method should prompt the user for a search phrase. Given the search phrase...
Description: The search method should prompt the user for a search phrase. Given the search phrase the search method should search each line in the file for the location of the phrase on each line. If the search phrase is not found on a line then just go to the next line. The search method must find every occurrence of the phrase on a line. The search method should print the line number, the line and the location of the...
A password verification system that does not allow user passwords to be proper names or words...
A password verification system that does not allow user passwords to be proper names or words that are normally included in a dictionary is an example of ___________ with respect to security systems. Group of answer choices Attack Risk Asset Countermeasure
C# Create an application that asks the user to enter their new password. The password must...
C# Create an application that asks the user to enter their new password. The password must be at least 6 characters long. Develop a custom exception handling case that checks for the password length. (hint: use " .Length " built-in method). If the new password is less than 6 characters long the custom exception should output an error message.
Using C++ Write a program to ask user to enter a password and validity the password....
Using C++ Write a program to ask user to enter a password and validity the password. The password should be 8 – 20 characters long (8 is included and 20 is included), it should contain at least one uppercase letter and one lower case letter. The password should contain at least one digit, and at least one symbol other than alphabets or numbers. Most importantly, the password may not contain any white space. Functions: You will need at least the...
c++ Develop a program that validates a password entered by a user. The password must meet...
c++ Develop a program that validates a password entered by a user. The password must meet the following criteria: Be at least six characters long. Contain at least one uppercase and at least one lowercase letter. Have at least one digit. Write a program that asks for a password and then verifies that it meets the stated criteria. If it does not, the program should display a message telling the user why and ask for another password. The program should...
Create a program (Python) YourFirstnameLastnameA06b.py to ask the user to create a password: The user will...
Create a program (Python) YourFirstnameLastnameA06b.py to ask the user to create a password: The user will first enter a password, then enters the same password again; If the second input is the same as first one, the user successfully creates the password. Print “Well done.”; Otherwise, the user will be directed to repeat the whole process (go to step 1.)
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password...
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password TESTACCOUNT that grants the user the ability to: Select and modify any table. Connect to and have access to all resources. In SSMS
Write C++ code that prompts the user for a username and password (strings), and it calls...
Write C++ code that prompts the user for a username and password (strings), and it calls the login() function with the username and password as arguments. You may assume that username and password have been declared elsewhere. Your code should print error messages if login() generates an exception: LoginException: "Username not found or password incorrect" ServerException: "The login server is busy and you cannot log in" AccessException: "Your account is forbidden from logging into this server" Any other exception: "Unknown...
Write C++ code that prompts the user for a username and password (strings), and it calls...
Write C++ code that prompts the user for a username and password (strings), and it calls the login() function with the username and password as arguments. You may assume that username and password have been declared elsewhere. Use virtual functions, pure virtual functions, templates, and exceptions wherever possible. Please explain the code. Your code should print error messages if login() generates an exception: LoginException: "Username not found or password incorrect" ServerException: "The login server is busy and you cannot log...
3. Write the statements to: • create a user named FooBar with a password of “candybar”...
3. Write the statements to: • create a user named FooBar with a password of “candybar” • assign the payments role created in the previous question to FooBar • assign the create session privilege to FooBar • Show the statements to connect to FooBar 4. For this question, I only need the query statement and not the results. Write the queries that use the user_sys_privs, user_tab_privs, user_role_privs, role_sys_privs and role_tab_privs objects to view the user and role privileges that are...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT