"Password Generating System": Micro-Project Report ON
"Password Generating System": Micro-Project Report ON
"Password Generating System": Micro-Project Report ON
MICRO-PROJECT REPORT
ON
MSBTE
YEAR 2020-2021
1
Course Name - Computer Technology
MICRO-PROJECT TITLE
CERTIFICATE
This Is To Certify That
Inor Vidya
Shermale Akshada
Has Satisfactorily Completed Micro-Project Work Entitled.
“Password generating system”
As prescribed by MSBTE, Mumbai, as part of syllabus under subject Cascading Style Sheets
(22519) for the partial fulfillment in Diploma in Computer Technology for Academic year-
2020-2021
3
INDEX
SR NO. TITLE PAGE NO
1.0 RATIONATE 1.
4
Acknowledgment
5
ANNAXURE-11
Micro-Project Report
1.0 Rationale:-
Java password generator to generate a secure password that consists of two
lowercase chars, two uppercase chars, two digits, two special chars, and pad the rest
with random chars until it reaches the length of 20 characters.
Benefits:-
A password generator can be part of a password manager. When a
password policy enforces complex rules, it can be easier to use a password generator
based on that set of rules than to manually create passwords.
6
It should contain one of the following special characters: @, $, #, !.
Many a time we forget our passwords and we opt for Forget password option and within
no time we get a new password at our registered email-ID or phone no. to login our account.
And every time we get a different password.
Sometimes we access our bank accounts while shopping from an online store or many more
ways, in order to verify our transition from the bank account, they send us OTP(One Time
Password) on our registered phone no. or our email-ID, within no time.
The following code explains how to generate such Passwords and OTP within no time and
what code we can use if in case we need to do so.
Program code:-
import javax.swing.*;
import java.awt.event.*;
public class PasswordFieldExample
{
public static void main(String[] args)
{
JFrame f=new JFrame("Password Field Example");
finl JLabel label = new JLabel();
label.setBounds(20,150, 200,50);
final JPasswordField value = new JPasswordField();
value.setBounds(100,75,100,30);
JLabel l1=new JLabel("Username:");
l1.setBounds(20,20, 80,30);
JLabel l2=new JLabel("Password:");
7
l2.setBounds(20,75, 80,30);
JButton b = new JButton("Login");
b.setBounds(100,120, 80,30);
final JTextField text = new JTextField();
text.setBounds(100,20, 100,30);
f.add(value); f.add(l1); f.add(label); f.add(l2); f.add(b); f.add(text);
f.setSize(300,300);
f.setLayout(null);
f.setVisible(true);
b.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
String data = "Username " + text.getText();
data += ", Password: "
+ new String(value.getPassword());
label.setText(data);
}
}
}
8
2. Computer Intel @,Core(TM)i5-6500 01 --
GHz,4GBRAM
9
8.0 Skill Developed/Learning outcomes of this Micro-project:-
10
Commonly used Constructors:
Constructor Description
11