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

Binary Search Trees with Lazy Deletion Implement binary search tree class with lazy deletion that has...
Binary Search Trees with Lazy Deletion Implement binary search tree class with lazy deletion that has TreeNode as nested class in Java. Design the class, TreeNode to have following class variables: int key; // All Keys are in the range 1 to 99 TreeNode leftChild; TreeNode rightChild; boolean deleted; Your program method must have routines to do the following operations. 1. insert //Should insert a new element to a leaf node. If new element is aduplicatethen do nothing. If the...
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.)
Password Checking Software to reset passwords often requires the user to enter the password twice, checking...
Password Checking Software to reset passwords often requires the user to enter the password twice, checking to make sure it was entered the same way both times. Write a program in Python that contains functions/methods in it that can verify that the two passwords entered are correct. Your project should contain a method that asks the user to enter a password twice, then either tell the user that the two entries were not the same and then start the process...
Write a pro-active password checker that checks to make sure that a user entered password meets...
Write a pro-active password checker that checks to make sure that a user entered password meets certain requirements. You must implement a simple program that prompts the user for two String values, a password and the same password again for confirmation. For the purposes of this lab, a legal password must have all of the following properties: ▪ Length of at least 8 characters ▪ Starts with a lower case letter ▪ Ends with a numerical digit ▪ Has one...
In PYTHON: Write a program that asks for a password from a user and checks if...
In PYTHON: Write a program that asks for a password from a user and checks if it satisfies the conditions: Contains at least one lowercase letter (a-z). Contains at least one uppercase letter (A-Z). Contains at least one digit (0-9). Minimum length 6 characters. Contains no spaces. If the password is valid, then the program prints “password accepted”. Otherwise, it keeps asking for more passwords from the user until a valid password is obtained. Hint: You might like to check...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT