 Hello, everyone. Welcome to the project Password Manager. Now, let us see the problem statement of this project. In the real world, the only threat to us is the post by the criminals residing in our area. But in the digital world, one would be prone to the threat by any person who resides millions of kilometers away. So in this digital era, our lives of the finance and the bio data, everything is being digitalized through electronic media and internet. So this makes us more vulnerable than ever. So this makes the cyber attacks more and more. So most of the people that are frequently prone to cyber attacks are the ones who aren't aware of about importance of having a stronger password. Having a name without any other special characters could easily be hacked by the hackers. So common attacks strategies used by hackers is a password is guessing attack. So by using hacking tools such as brute force algorithms where it tries each and every actor in the 26 alphabets. So later, a fully efficient computer using the hacking tools can try out thousands of passwords per second. So we should maintain at least a special character, a uppercase and lowercase letters, which makes more time to crack the password. So the application creates an awareness among the users about the importance of having a stronger password and to store this password, thereby making it easy for the user to retrieve information from a database instead of remembering each and every password. Now let us talk about applications and scenarios of this project. Most of the users who claim that they have been dropped were found that they have created passwords that just happen to have alphabets which commonly turn out to be their names or dictionary words, mobile numbers or digits entered sequentially, less characters less than 8 etc. Every year, millions of dollars were being washed away towards the hackers due to the people's negligence towards the security. In our application, we help the user in creating a password that isn't complicated enough to remember and at the same time good enough making it possible for the hackers to crack it. So we also suggest passwords based on the phrases given by the user which could help the user to set a good password automatically without putting a lot of effort. Along with this creation, we even store the login credentials given by the user that are secured in a database file. We can be using the access, the information anytime, whenever it's needed. So we are going to create a password for this application. So only the user having the password can avail the services. So the tech stack involved in this project are Python, PyQt5 and DBMS. And PyQt5 is used for creating applications mostly GUIs known as graphical user interface. And DBMS is well known as database management system. Now, coming to sample input and output, you can see that this is how the GUI looks. So whenever user enters this name and password, if the password strength is less than the suggested. So by using the keyword option, you can just give this keywords and I mean the phrases which we frequently use and we'll suggest few passwords which have more strength and takes more time to crack. So this is the GUI and the appearance of the GUI with the password manager security. Now let us wrap up the session by saying thank you. Hello everyone. Welcome to the project password manager. Let us start our project by designing the GUI of the application. So open Qt designer application and you can see a pop up stating template slash forms. So click on main window and click on create. Now you can see a empty screen has been created and named as main window untightened. So main window acts as a placeholder for all the widgets that we are going to use. So I'll classify this Qt designer by change saying what properties are in this Qt designer. So let us start from the left side of the panel window that is widget box. So it has a great collection of widgets such as layouts, spaceships, buttons, item views and many. And on the right side, you can see it has been divided into object inspector and property editor. Basically object inspector is fair. If you add any button, I mean any widget component, it will add into the object inspector so we can have a view how many widgets we are going to use. And we can also rename the object names here. And let us come to the property editor. In the property editor, you can change the font size, the font and make it bold and you can change any of the font stylings and basically it acts as a style sheet of a widget. So now let us start our project by designing a title for our project. So for making a title, we need a label. A label is an uneditable text where user can't interact with the label. So it can't be edited. So let us start our application by giving a title to it. So our title will be as password manager. Now that we created a label, you can also see in the object inspector it has been created. Now let us add a background color to it by adding a frame that is in containers. So you can go to containers and you can find a frame and place on it. You can see that and you can also resize any widget by just resizing this. Now if you want to add background to a label, add a frame and right click on it and you can see a change style sheet option and click on add color and click on background color. So you can have a great collection of color palette and you can select any of the color. In this case, I'm using black. You can see that I'm applying the changes and you can see it has been applied. So now let us add the color to the label. So see right click on it, change style sheet option, add color to the background and click on yellow. Make it apply. Now place it on the frame and resize the frame and place it on the top. Now let us add some font and make it font big. So let us make the font big. We'll make it bold. You can see that the changes have been applied. So resize the widget, resize the label to. Now let us start labeling the input widgets that we are going to take from the user. So in this project, we are going to have six labels and six text edits or line edits. So basically line edit acts as a user where can user can interact with it and give the text or remove the text from it. So let us add a line edit. Let us add by line edit. We'll be needing six line edits and four for the input. And the other will be for it has been divided into two sections where user can retrieve data and user can store the data. We will be dividing this GUI by two phases like we will be giving a partition and so other two line edits will be using where in the search. I'll show you one by one. And for this four line edits, we need four labels. Now let us add a push button so that your user can fill the details and click on the push button so that we can retrieve text from it. As I told you, we'll be dividing into two sections. So let us add a vertical line that can be find in display widgets. Make two lines. Let us name our label names. So first one will be the user name. So write it as user name. The next one will be password. Next one will be the website. The keyword. This button. Now let us change this font. 14 to 16. 12. 812. For the website. For the keyword. Now let us make our text bold. Now we have completed the part of submit button. So let us keep our search. So again, we will be needing two more labels. Two more line edit. Let us rename the label names. By website name. Passcode. Now let us add a new widget called. Text edit where a paragraph or a big text like where you can see in line edit only a line one line of it can text can be added. But in the line edit, you can add a paragraph. So we'll be displaying our output in this like text edit. So let us create another push button. For search. Here we are. Think that's that's it. So GUI is done. So let us jump to the coding part. Now that we are done with designing the GUI of the application. Let us save the file by hitting control has. And save the file as password dot UI and make a directory so that we can pass every file to that one directory and we can use that when we are creating a database. So let us save this file and open command prompt or your choice of editor so that we'll convert this dot UI file to dot py file. Now let us write the command to convert the dot UI file created will convert it to dot py file. Sorry. So Python. Y UI C5 Minus X The file name in my case is password dot UI. And we need to convert this file as output file name as it is also of your choice. So make it as password dot. Y It ended. We can see that it went to the next line so that there are no errors. So let us run the file by you can see the password dot py file has been created in my directory. Let us run this file. Now you can see that it gave the GUI as output. So now let now let us test whether the GUI is working or not. It's taking the inputs. But it's the submit button and research buttons are not working. So to make it work we need to add some functionalities to the submit and search button. So let us start coding the submit and search buttons in the dot py file that we have created now. Now that we are done with converting the dot UI file to dot py file. Let us start giving some functionalities to the submit and search button to give some functionalities. We need to connect the submit button to a function. So first we'll connect the button. So this command says dot push button dot clicker connect. Clicker connect is used to connect a function and to the button name push button. So same for the sub cells dot search. We are connecting the search function that we are going to write now. It's been connected to push button underscore two. So now let us write the function fsubmit write set print clicker. Same for the search right clicker search. Here clicker. Now you can see that let us run the application and see whether clicker submit and clicker search are coming in the GUI mean in the output screen. Now let us click submit. Let us click search. You can see that in the command prompt we are getting the outputs at clicker submit and clicker. Now let us include some more features and get some input from the user and print it in the command line. Let us get the input from the user by using this dot line edit cells dot line get text. So basically we have four labels as I told you before. Line edit is given for the user name and line edit underscore two is given for the past. Basically past means password that means website and key is the key word that we are going to use while generating passwords. Let us say what is dot text. Text is basically to retrieve text from the user input screen. So let us print. Let us see and run whether the output is coming when whenever we print. Now let us see and give some inputs and we'll see whether it's printing in the command line or not. The password as we see. So let us submit this. You can see that it worked. It came in charge ABC and Facebook and deaf. So you can see that we can we can we are we are now able to retrieve text from the user input screen. So now we can do the same for the search button as well as so let us do for the submit button. So in the submit button we are only going to have two text fields. So let us give them names as so let us give the names as p a z and w e. Basically w e stands for website and p a z is for the passcode. So let us get let us retry the text by using dot text and print whether it is coming on. So let us again run the application. Now let us check that passcode will keep some text passcode. Let's click the search button. It's working text comma web. Now we'll check both by giving the submit and the user. Let's give ABC. Let's click submit. It worked and see that it also gave ABCD as the output. I can see that it also gave ABCD and the text and web at the same screen. So both the submit button and search buttons are working now. So let us give some more functionalities by it by reading the inputs and giving some conditions to it. Now before moving to the coding part of the submit and search button, let us establish a connection between the UI and the SQL light database to create a SQL light database. Initially, we need to import SQL light and then we need to create a database which holds n number of tables. So to create a database, we need to write SQL light three dot connect and write the database dot SQL light. After that, we need to create dot cursor to point out each time in the table where we need where we are going to add values. As I told you, database a collection database is a collection of tables. Now let us create a table on the password SQL light database. We'll create a database name as password and table name as pass. So in the past, we need to have some columns as a table. We have columns and rows at the same proceeds in the database also. So in this in this format, we'll create a table in the path in the database named password. So we need to write create table table name and column names and the data types that we're going to use. So here represents both numerical and string data types. So we are we are going to create three columns that are user pass and web user name and password and web website name. So as we are dealing with the password manager, we are going to need three columns and these three are play vital role while fetching data and inserting data. So let us insert some random values like Raj as the username, password as and the website name Facebook. Just run this and see whether it says the changes or not. It went to the next line. So there are no there are no mistakes. Now let us see what happened in the database. Now you can see that. Let us see whether when we execute a command, they'll start from pass. Let us print the output. So before printing the output, we need to fetch the data and store in a variable. So for fetching data, we'll use a command called fetch all to see your dot fetch or helps us to fetch the data from the database. So let us print downs variable. It worked. So you can see that you were a ABC Facebook and has been stored in a form of array. So this is how you store the values and retrieve data. In the eighth line, we have insert the values and the ninth line we are calling all the values in a database to print in a form of array. So that helps us to indicate all the columns to be printed in the in a certain variable. So now let us see if we ask if we name a website name and we need to get the output as username and password. What I'm saying is basically we are going to only pass Facebook, not as all the columns. So if you pass Facebook, we need to get you brought an ABC. Let us try that. Just name the website name as Facebook. And let us execute select star from pass their web equals to Facebook. So we are going to pass W as a variable in form of an array to fetch the data and store in a variable. So let us again print the output. It again worked. You can see that I only passed W as the website column name only Facebook, but it gave out more of you Raj ABC and Facebook. This is how you retry the whole data by only passing the column name. Now we'll use this function of this database and we'll add to this the submit and search buttons in our database by creating a connectivity to the GUI. So let us see why we create a database. And before that we'll be importing few foreign modules such as SQLite to which is that we are going to use now like to hide a password. We should never show our password. So we need to touch the password with the star marks. So to do that we need to import your application Q widgets and your push button and Q message box. These widgets contain the ability to make the password uneditable. I mean to hash the password to star so that it is not visible to the user. Now let us add the hashing technique for converting the password to star marks while we are writing the password in the GUI. So to do that we need to use that echo mode. It's a syntax which is used to convert to stars. So we need to perform this for a line edit. So we need to import the line edit line edits from QT widgets Q line edit dot password. So this makes our GUI more like more interactive with the user when he's writing the password. It will be saved God. So we have two password columns. So we need to use for the both line edits. The one is for password and one is for line edit which we created for pass code. The pass code is used to encrypt the GUI when like no one can use the GUI without the permission. I mean with the password. So we need to use a pass code also. So that we created in the line edit six. Now let us check whether it's working on. You can see that I have given you can see the password. It's giving an asterisk marks star. This how you encode the password and make it and not visible to the user whenever it's typing. So no intruder can see the password. So on the same way as I told you about the pass code, they can also do the same. They can also see that same thing happen. Now let us print by printing. How will it how will it print in the command line? Let us print. See it's working. I've gave in the in the column of search search button. I've given a BCDF and in the submit button I give HHH. So now you can see that you can also encode the hatched one to the normal text. Spy Qt file. So let us include this functionality in the submit button. So then we can easily use this operations and make the password more. I mean, make the password more safe. Call it from the vulnerable. Now that we are done with the setup of the database. Let us know more about this project by adding few security features to the user while storing the password and retrieving them. So when user wants to create a password for a website and store, he needs to follow a few important rules such as length of the password should be greater than 8 and it should contain at least one uppercase and lowercase followed by a special character and numbers. And adding these helps the user to safeguard him from the hackers. And after just following the set of rules, only it allows the user to store the password in the database. And if the user faces difficulty to create a password, we also have a two additional features where user can choose a keyword which is of frequently used words in this daily life. So we can generate a random password using the keyword or in such a case where he don't have any keyword like that. We'll also suggest a few random passwords, which also bypasses all the set of rules that we are going to keep like uppercase and lowercase. This is the flowchart of our project. Now let us integrate with the search and submit button in code. Before moving to the coding part, let me explain you how to implement this algorithm in the coding part. So basically we'll be instalising five Boolean variables that are of length of password, uppercase, lowercase and special character and number. So we will be instalising this all as Boolean variables and we'll check if all the things change to Boolean true, then only it will go to the submit button. So let us start the coding. I can see that let us see before we have, before by using the dot text command, we extracted the text from the user. So let us implement the algorithm by using the Boolean variables. Now as I told you before, we will be using Boolean variables like, so Hasnum says that the Hasnum is a variable that takes care about it is having the number or not and Hasnubs sees is it having an uppercase and Hasnows sees lowercase and has special looks about any special characters I'm missing or not. And HasLengthMess basically it will find out the length of the password if it is greater than or equal to it, it will show us true or else false. So length is a function to find out whether the given string is, I mean we need to find out the length of a string to use length. Now that we created the Boolean variables, let us instead I see a few statements and know whether this are like classify whether he's following the given rules or not. So we need to include a string called special characters because we can't we don't have any library to find out the special character. So these are the special characters that we use for use day in the daily life. So user should use any of the one special character. So before this we will be importing a model called random. So write import. So the reason we are using random is to generate some random alphabets and letters. Now you can see that let us give some if else conditions. You can see that I have given some if else condition. Before you know that the ASC holds the value where password has been entered by the user. Let us iterate by using the length. What happens here is we are going to iterate the length whole string. We are going to store each character in the string the variable called C. And if it is following the rules which we have implemented, it converts the Boolean variable to true before all are installed as calls. You can see that for I in range length of pass. So basically range function uses to get a deal. I mean a range between zero to five or like that. So if the length of pass is six, it will generate a range from zero one, two, three, four, five. At the position zero to character, we are going to store variable C. So at each iteration, I is going to change and we are going to take whether each character is following rules or not. As we told you before, C.isTiget is basically sees whether the alphabet is containing, I mean the string the character in the string is following the rule is digit. IsTiget knows whether if the given character is a digit or a alphabet. So if it is a digit, it will convert hasNum to true. So basically we are goal is to convert all hasNum, hasUp and hasLow and hasSpecial to true. So like this, IsTiget used to characterize whether it's an alphabet or a digit. And isSuppercase whether the given character is in uppercase or lowercase. And the same way is lower finds whether the given character is in lowercase or uppercase. And the same as I told you before, we have created a special character string. Basically it checks whether the given character is a part of the special character. So inOperator is used to see whether the given character is in the special character string. I'll show you the special character string that we have created. InOperator returns as a Boolean variable and says whether if you have user entered a exponent remark, it checks whether it is in this whole string. And it will also return a true or false. So if it also follows, it will return as special is equal to true. Now let us keep an if condition and we'll check whether what are conditions it passed. And if it isn't passed, passed. So we should say user that it is not working. So you should choose another password which is following all these conditions. Now if you see that in the 163rd line, I have installed a total line which checks whether all the six features that are true or false. So hasNum, you know that it follows dot is digit and hasUp sees dot is upper and hasLow is lower. And it uses inOperator to check whether this is special string having a special character or not. And hasLens checks whether it qualified the basic it's greater than or eight length of the password. So after checking, if it is successfully entered inside the box, we'll be showing an entry successful dialog box. You have seen many dialog box in your daily life. Basically, dialog box appears when you when you create an alert foreign function. So to import this dialog box before we have imported a widget known as Q message box. Q message box helps us to create a dialog box. So dialog box appears as a pop up whenever you submit some information in some forms. Basically, when you apply any engineering form, you can see that it gives a pop up that are you are you confirm that you are entering this website like that. So to create a new message box, we need to create a object of it. So we are going to create a object of new message box and storing message box variable. So after that, we can set an icon called informative. It just creates an icon in the message box that I'm going to show after running this application. We are also going to set text because as it passed all this condition, we should say the user that is successful. Or else we are also going to write an else statement that we're going to write is not successful because you're not going to follow that because you failed to follow this rule. So next thing is message dot set window title. It's just it will set a title like password manager. I'll show you in the GUI. Message dot set standard buttons basically creating OK and cancel buttons in the small box. Finally, it will return my message box.exe. So to exit from it, you should just need to cancel and it will close the message box. Now let us run the application and see whether it's working. So now let us run the application, write some username, keep the password as a capital A, d, 0, 0, hit submit. You can see a pop up stating that it is successful. Now you can see that it showed entry successful. So we have completed first phase of project by completing the submit button. Now let us just integrate the database and whenever it's showing the entry successful pop up, we should just write the code. I mean, we need to add the values to the database. So let us write the code for the database. So before writing the code of database in the password dot py, you can see that this is how we create is how we insert value. So let us write the code in the password dot py, check whether it has been applied in the database. This is how you wrote the code for the saving the values in the table pass. I'll show you, we have created a table name pass in password dot sql. So I have first connected the password dot sqlite to the c o n. Now then I told that to execute, insert the values in the table name pass, which I created before. And the reason they wrote question marks here is to I should pass all the three variables at a time. I've created a tuple that holds multiple dynamic elements. And whenever I pass this task variable, it inserts the values in this table column name pass. So let us check if it is working. And let us say again in the database, if we give the website name, and we should return all the user pass and let us give us a value. Let us give the values as username as password as capital a, the date in the website will give us Twitter submit. And you can also see a successful option. Now you can click on OK and close the GUI. So let us check whether it has been applied in the database by typing website name Twitter. And see if it returns the value as my name and the username which I've entered, we have successfully completed the submit button. Yeah, it worked. So you can see that it worked. I'll show you. So basically, I just gave the website name as Twitter, but it also returned the username and the passcode. So this is how you store the values in the database and retrieve in the GUI. So now let us focus on the search button which helps to retrieve database. Now let us write the code for the search button. Initially, we have created a variable called PSS, which holds the value of the passcode entered by the user. And the value is the website name where user tries to retrieve the password for the particular website name. So we use this PSS to authenticate whether the user is trying to log in or not. So initially we have wrote a if statement which tries to authenticate by giving a default password as root. So you can change the root of any of your choice. So you can change this root and keep any other name and you can authenticate the user. So after authentication of the user name by the past PSS variable, we will be connecting to the database by using the cun.sqlite3.connect password.sqlite which we before created the database. So after that, we are going to install as a cursor and we're going to now execute the command the next star from PSS where web equals to the WE variable. So there is a reason we have created a WE variable which holds the website name. So before that we have in the Submit button, we have created a Twitter account. I mean a Twitter entry where I have given the website name as Twitter and it retrieved Urage and the ABCDF password. So now let us try the same by seeing the Submit button. I mean the search button. If we try to give the Twitter website, if it is giving the Urage and ABCDF, it should print the same. Now let us run the command to print. I mean, so there is a case where if user tries to upload the same website two times. So we are going to iterate rows and rows. So rows has the value of two. I mean, if the universe case if user enters two passwords for a Twitter account, it is going to show in it is going to store in a multi-dimensional array and they're going to print by one by one one row by another row using the for loop. And they're going to see that now. So let us run the code. And in the password, I mean, in the right set, you should enter the website name as Twitter. And pass code, you should only write root or else it will say it like, I mean, it doesn't run. So we are also going to install a else statement where it authenticates whether it's right or wrong. If it is wrong, it's going to give a pop up that you are the password code which you entered is wrong. So let us submit. So there is an error. So the reason it it gave error is because we have wrote the table name wrong. So meaning the table name is P.A.S.S. Now let us run the command. Here the terminal can run that. Now give a website name and pass code as yeah, it worked. Now it also returned you branch and the password and the Twitter name. So this is how you fetch the data using the search button. Now as he created a text area, we need to fill that. So let us print the same input, same output in the search search text. I mean that the search button, it is a text area. So we will fill this output and fill the set text by using the set text command. We are going to fill this area. So let us write the code for it. Now let us add this line line of code where it it basically where we are as we have seen a print statement. So set text command used to display the output in the frame. I mean in the main window which we have created in the text area that at the search button place. So I just created a username and I used a slash to increase the top space and password and slash and slash and I used to go to the next line. And now as I told you before it is going to make a multi-dimensional array. So I told only to show the latest input as the latest input that has been installed to the database. So minus one helps us to get the last element in the multi-dimensional array. And then the zeroth position, we are going to get the username at the first position you are going to get the password. So as we in the database I'm going to show in the database we are stored the column names as user, pass and web. So in the same order we are also going to get the output but without the website name. So let us run the file. Now let us get the website name as Twitter password code as root and let us search. See it worked. Give username, password and my username and the password. So this is how you retrieve data and show in a text area. Now let us write the best block of the search function. So whenever the user enters the wrong password of the search query, he will be getting a warning stating wrong password and please try again. So to execute this we need to use Q message box that we have used in submit function. So let us write else and as I told you before that Q message box. So let us copy the same from the submit button and paste it here. So we will be first creating the object of Q message box and we are going to set icon. And now the only changes we are going to make it critical before it is informative. So in the submit button we are going to give some information to the user. But here we are going to say it's critical because user entered a wrong password. So later we will be adding set text command. So basically as we as we can print in the console also to display in the GUI itself. So we should use set text command to display our statement in the GUI. So we'll be stating wrong password. So please try again. So to cancel this dialog box we need to add OK button and cancel button. So let us run this application and see. So you can see the output. I mean the GUI. So let us enter Twitter. And passcode as ROO. So it will trigger the else block. So let us click search. And now let us see. Oh yeah it's working. So you can see that password manager is a title name and the wrong password please try again. So the icon which you have sent is critical. So instead that's the reason it shows a warning symbol. And you can also the OK and the cancel buttons. So now let us wrap up this search function. And let us start writing the random password generator for the submit button. Now let me explain you the submit button first. So basically we first took the inputs from the user by using line edit dot text. The dot text is used to get the text from the user input. And later we created four Boolean values and we judge it whether the given password is meeting the standard or not. And we used to be used dot is digit to whether to check whether he used and number or not. And is supper for upper case and lower for lower case and special characters by using in operator. So these conditions are important while we are using a random password. So after this we wrote if statement that checks whether all these conditions are correct or not. So later we created a message box and showed the password. And now you can see that I have created an else statement. And you can just now I've explained that how to generate the random password. And this is how you do that. Like I mean you will be using two by loops. You'll be keeping an increment counter variable at each iteration. And it holds the variable and chooses our by using over the end random generator. We got the characters one by one and we are getting there. We have set a condition until less than eight. So this is the submit function as a whole. Now let us see a search function in the search function. We have the first thing first thing is we'll check whether the past code written is correct or not. If it is wrong, it will be going to exclude the L statement. When a statement if it is correct as the users to enter the website and we are going to store in the WP variable. So we are going to pass this to the SQLite query and it is going to fetch and we are going to display in the text edit that we have created. Or else if the past code which entered is wrong, we are just going to print the wrong password. Please try again. So this is has a whole summary of the both sub both submit and search button. Now let us write the code for the random password generator. So first import the random module at the top as I imported before. Now let us go to the submit button and write the else block after this if if statement. So this is statement we are going to check whether he followed all the rules. So if in case if we didn't follow it, let us write else. Now the goal is to generate random passwords either using the keyword given by the user or a randomly generated alphabets. So as in the both cases, we need a special character to make a special variable. As a name, you can create any variable name and let us copy the special characters that we have declared before. Paste it here. Now let us make a string. All suggest and I say where will I and give an initial increment as zero. So our goal is to generate at least four random passwords for the given keyword or in random generated alphabets. So I less than four will be the outer while loop and the inner while loop will be the length of the password. So I've told you before the length of the password should be greater than eight. So length of password is basically key. So if the user entered keyword as greater than eight characters, we are going to just add the remaining characters such as numbers, uppercase and lowercase or else key will be given as a double code. I mean the empty string. So it depends on the user. If user gives and string, we are going to generate random password using the string. Or else we are going to give an initial I mean double codes and we are going to add it. So that's the reason. Length of key less than eight. So basically at each iteration, we are going to increase the key length. So if it is eight, it's going to get outside the loop and I will be incremented by one. So totally we get four, four random passwords. So let us write E equals to E plus R of random dot random. So randint is basically it can generate integers between a range. So arranges basically over the off a. So I mean character a and over the off character set. So over D is to convert an alphabet to a numerical value. So it's going to give an ASCII value for an alphabet. So after that, let us come out from the inner while loop. And let us concat key by adding str of random dot and now let us gives an range of numbers. So our first condition satisfies in the length of the key should be less than eight. I mean after less than eight only it will be adding to the suggest variable. So for sure it will be greater than eight. And the next condition is adding number to adding at least one number to the password, suggested password. So random dot randint will generate any number between zero to nine. That is only integer. So randint is used to generate integers. So after that we're going to write key plus equals to str of random dot choice. So here we use choice because to take any particular alpha, I mean particular character in a string or any array. So as we created a variable called special, it's going to take any of the character in the whole in whole special characters randomly. So we are going to pass that variable here. Let us make the first letter as capitalized. So key dot capitalized. So capitalized is going to make the first letter as capitalized. So now let us append to the suggested one. So as I created a variable called suggest. At the end of the four iterations, its length is going to be four. I mean four suggested password. So suggest plus equals to key less than explained. So rather creating four variables, I am like the algorithm works by on cutting all the four characters by line by line. So we are going to use slash and show that at each iteration, it's going to go to the next line. And finally increased the eye. So I equal to I plus one or I plus equals to one are both same. The same logic I have used for key plus equal to str. So this is just algorithm for generating random password. Now on spelling. Now let us add you message box. So to show whether these are correct or not. I mean the after generating the random password, we need to show the output in a message box which we have created in the submit button as well as in the search button. So we're going to make again a Q message box object and we're going to just copy the suggest one and paste it there. So as I told you suggest will ask all the top four passwords that we have generated using random password. Now as we created a variable called suggest. Now let us show this variable with some rules and regulations like what are the rules that we have met to get the random password in a Q message box as the same. So make the object of Q message box and get icon as information and set window title and now keep a set text command whenever as else statement will only trigger when the user enter password. This doesn't matching the standard. Now let us as I told you will be giving some rules. I wrote in a thing I'll copy that you can see that what I wrote is basically the password should meet the conditions. So the basic rules at least one number case lower case is one number and at least one special character and at least eight character. So we will be using two more new things that is known as set detailed text. So as I made a ring to show this in a detailed text in the Q message box, we're going to use two new modules to use that. So this is a syntax for that. So it is common for every Q message box OK and cancel and later that informative text is to set the suggested passwords and set a detailed text issues to show the rules and regulations that we followed to meet the condition. So a detailed text and set informative text is to add the important things that we need to show when we are doing the Q message box. So let us run this application and see whether working or not. I can see that. Let us give the username. But this time first time we'll give the password as strong standards like just write the username as the password also. Let us skip the subject button. Now you can see that a pop up box came and it said the random password by using the random password generator it generated four passwords which meets the standards and the one with a tool to see the details of the rules which we followed. You should click the hide details and click on the show details. These are the rules and now this is the password that we have used. Now you can take any of this password and use this as the password and it will bypass the rules. Now we'll use the keyword option given now we'll generate passwords using the keyword. Now let us give the keyword as because in the submit button now you can see that it used to my keyword UV and it generated four new random passwords. So I think you understood how we did the random password using the keyword and without the keyword. So this is how we generate the random passwords. So let us wrap up this session by explaining both search and submit functions in a in a way like you can just revision the submit and search like what we did in the summary.