The goal of this programming assignment is to develop a password checker program that checks how strong is the entered password. The password checker have seven rules to evaluate the vulnerability of the given password: 1. The selected password must be at least eight characters long. 2. The selected password must have at least one uppercase letter. 3. The selected password must have at least one lowercase letter. 4. The selected password must have at least one digit. 5. The selected password must have at least one of these special characters: @, !, #, ^, & *, or $. 6. The program has also access to a list of previously leaked passwords and should reject if the entered password is already leaked with respect to the list. 7. The selected password cannot consist of an English word. For example, mybookLet1990! violates this rule. A dictionary of words (with at least size of 5) is given. Using shorter English words or using any other words that are not in the file is valid. Searching large files is an expensive operation, therefore your code must first check the first five criteria and then if the entered password satisfies those, the program checks the entered password against rule six and then rule seven.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
v
V
//This functions reads in string in the file specified by the filename and fill word_dic dictionary. It going to be used to read
both leaked passwords and word dictionary.
//Change any call type of parameters at your discretion (call by value or call by refrence); Do not change the name of the
function.
int readWordList(string filename, vector<string> word_dic) {
}
//complete me
return -1;
int compare(string word, string query) {
}
//complete me
return 0;
v
//for each rule if the passwords satisfy the rule set the corresponding entry in the checks array to true
void checkPasswordChars (bool checks [CHECKS_NUM], string password) {
}
//complete me
//This function checks if the passowrd is among the leaked password provided by password dic
//Change any call type of parameters at your discretion (call by value or call by refrence); Do not change the name of the
function.
✓ bool isInLeaked Dic(vector<string> password_dic, string password){
}
//complete me
return false;
//This function checks if the password contains a dictionary word provided by english_dic
//Change any call type of parameters at your discretion (call by value or call by refrence); Do not change the name of the
function.
bool isInEnglishDic(vector<string> english_dic, string password) {
if (password.find(word) != string::npos) {
v
for (const string& word: english_dic) {
v
return true;
}
}
return false;
}
Transcribed Image Text:v V //This functions reads in string in the file specified by the filename and fill word_dic dictionary. It going to be used to read both leaked passwords and word dictionary. //Change any call type of parameters at your discretion (call by value or call by refrence); Do not change the name of the function. int readWordList(string filename, vector<string> word_dic) { } //complete me return -1; int compare(string word, string query) { } //complete me return 0; v //for each rule if the passwords satisfy the rule set the corresponding entry in the checks array to true void checkPasswordChars (bool checks [CHECKS_NUM], string password) { } //complete me //This function checks if the passowrd is among the leaked password provided by password dic //Change any call type of parameters at your discretion (call by value or call by refrence); Do not change the name of the function. ✓ bool isInLeaked Dic(vector<string> password_dic, string password){ } //complete me return false; //This function checks if the password contains a dictionary word provided by english_dic //Change any call type of parameters at your discretion (call by value or call by refrence); Do not change the name of the function. bool isInEnglishDic(vector<string> english_dic, string password) { if (password.find(word) != string::npos) { v for (const string& word: english_dic) { v return true; } } return false; }
The goal of this programming assignment is to develop a password checker program that checks how strong is the entered
password. The password checker have seven rules to evaluate the vulnerability of the given password:
1. The selected password must be at least eight characters long.
2. The selected password must have at least one uppercase letter.
3. The selected password must have at least one lowercase letter.
4. The selected password must have at least one digit.
5. The selected password must have at least one of these special characters: @, !, #, ^, &, *, or $.
6. The program has also access to a list of previously leaked passwords and should reject if the entered password is
already leaked with respect to the list.
7. The selected password cannot consist of an English word. For example, mybookLet1990! violates this rule. A
dictionary of words (with at least size of 5) is given. Using shorter English words or using any other words that are
not in the file is valid.
Searching large files is an expensive operation, therefore your code must first check the first five criteria and then if the
entered password satisfies those, the program checks the entered password against rule six and then rule seven.
The dictionary files (both English and leaked) contain only lowercase words, so when evaluating rule six and seven, you
should ignore the case of letters.
The leaked password file is big, so you need to search the file efficiently. Here you must use binary search. The leaked
password file has been ordered, however, the order is only based on alphabetical and numerical characters (the order
ignores the symbols and special characters). Therefore, you need to write a compare function that compares the words
accordingly (consider only alphabetical or numerical characters in the comparison). You will use this compare function
inside your binary search. For example, if maur7007 is in the leaked password file, $Maur7007# will be considered
unacceptable. You are not allowed to use the compare function from string library.
Transcribed Image Text:The goal of this programming assignment is to develop a password checker program that checks how strong is the entered password. The password checker have seven rules to evaluate the vulnerability of the given password: 1. The selected password must be at least eight characters long. 2. The selected password must have at least one uppercase letter. 3. The selected password must have at least one lowercase letter. 4. The selected password must have at least one digit. 5. The selected password must have at least one of these special characters: @, !, #, ^, &, *, or $. 6. The program has also access to a list of previously leaked passwords and should reject if the entered password is already leaked with respect to the list. 7. The selected password cannot consist of an English word. For example, mybookLet1990! violates this rule. A dictionary of words (with at least size of 5) is given. Using shorter English words or using any other words that are not in the file is valid. Searching large files is an expensive operation, therefore your code must first check the first five criteria and then if the entered password satisfies those, the program checks the entered password against rule six and then rule seven. The dictionary files (both English and leaked) contain only lowercase words, so when evaluating rule six and seven, you should ignore the case of letters. The leaked password file is big, so you need to search the file efficiently. Here you must use binary search. The leaked password file has been ordered, however, the order is only based on alphabetical and numerical characters (the order ignores the symbols and special characters). Therefore, you need to write a compare function that compares the words accordingly (consider only alphabetical or numerical characters in the comparison). You will use this compare function inside your binary search. For example, if maur7007 is in the leaked password file, $Maur7007# will be considered unacceptable. You are not allowed to use the compare function from string library.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Testing Strategies
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education