Notes and Password Manager
Notes and Password Manager
AND
PASSWO
RD
MANAGE
R
ABSTRACT
1. It has an intuitive user interface that makes it simple for users to comprehend and
utilize in an efficient manner.
3. By creating a strong password automatically and doing away with the necessity
for human password formation, it saves time. The Java password and note manager
tackles a pertinent modern problem—that is, the growing significance of data
security and privacy. The firm is continuously at danger of data breaches and
illegal access to sensitive information as a result of the increasingcyber risks that
come with technological advancements. This concept aligns with current concerns
about cybersecurity threats, data privacy, remote work, and digital cooperation.
In its most basic form, a password manager is a program that stores a user's login
credentials, such as their username and password, to lessen the cognitive strain of
having to remember numerous different login credentials. This collection of
passwords is called a password vault. Ideally, the vault should be kept encrypted,
and the master password—a password selected by the user—should provide the
encryption key. If desired, the password vault can be stored online, enabling
synchronization across many devices. In addition to storing user-selected
passwords, the majority of password managers available today also let users create
new passwords. In this project app is created in which there is a login page, if a
user is new then he/she first of all registered herself/himself. After getting
registered he/she able to login with that page and then a page open where he/she
can store his/her passwords along with the websites name also if he/she wants to
add or delete or want to update can update with the given options on the page
below.
EXISTING SYSTEM
A Java-based password and note management project's background investigation
comprises a detailed analysis of the market environment, accounting for prior
research, technological advancements, and user needs. Below is a summary of the
background research for this kind of project: Security Environment: It's critical to
comprehend how cybersecurity threats and password-related vulnerabilities have
evolved over time. Examine the most recent hashing techniques, access control
plans, and encryption algorithms to guarantee robust data security. Password
manager trends Looking at well-known note-taking and password apps on various
platforms will make it easier for you to identify common features, security best
practices, and usability standards in current solutions. Examining user feedback
will assist you in identifying the benefits and drawbacks of the available solutions.
PROPOSED SYSTEM
Key features, design considerations, and security measures are typically included
in the proposed solution for a Java-based password and note manager project.
This is a summary of a previous project solution that was suggested: Key
attributes: o Secure Data Storage: To guarantee the safe storage of notes and
passwords, use strong encryption algorithms. o User Authentication: For
improved user verification, include multi-factor authentication (MFA) and
consider incorporating biometric technologies. o Intuitive GUI: Utilize Java's GUI
features to create a graphical user interface that is easy to use and intuitive for
users to interact with. o Cross-Platform Compatibility: Take advantage of Java's
platform independence to make sure the application runs without a hitch on
various operating systems. o Cloud Integration: Offer cloud storage with robust
encryption for both in-transit and at-rest data
SOURCE CODE
import java.awt.*;
import
javax.swing.*;
import
java.awt.event.ActionEvent;
import
java.awt.event.ActionListener;
import java.util.ArrayList;
import
java.security.SecureRandom;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import
java.security.InvalidAlgorithmParameterException
; import java.security.InvalidKeyException;
import
java.security.NoSuchAlgorithmException;
import
java.security.spec.AlgorithmParameterSpec;
import
java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import
java.util.Base64;
import
javax.crypto.*;
import javax.crypto.spec.PBEKeySpec;
import
javax.crypto.spec.PBEParameterSpec;
// This class is used to create a loading
JFrame frame;
JProgressBar();
SplashScreen()
{
createGUI();
addImage();
addText();
addProgressBar(
); runningPBar();
frame frame.setUndecorated(true);
frame.setLocationRelativeTo(null);
image frame.add(image);
text.setForeground(Color.black);
frame.add(text);
}
public void addProgressBar(){
progressBar.setBorderPainted(true);
progressBar.setStringPainted(true);
progressBar.setBackground(Color.black);
progressBar.setForeground(new
Color(0X38E54D)); progressBar.setValue(0);
frame.add(progressBar);
it to 0 while( i<=100)
try{
if(i==100)
frame.dispose();
}catch(Exception e){
e.printStackTrace();
//Deleted entries
value; Entry(Object k,
Object v){
key = k; value = v;
this.loadFactor =
loadFactor; this.useProbe =
useProbe;
//Complementary
hash(Object key){
}
private void rehash(){
if (entries[j] ==
null) { entries[j]
= entry; break;
used = size;
@Override
int h = hash(Account);
entry = entries[j];
if(entry==null){
++size;
+used;
return
h;
if(entry == NIL)continue;
if(entry.key.equals(Accou
nt)){
Object oldValue = entry.value;
entries[j].value = passwd;
return (int) oldValue;
return h;
@Override
Account) { int h =
hash(Account);
i);
Entry entry =
entries[j]; if(entry
== null)break;
if(entry ==
NIL)continue;
return null;
@Override
if(entry == NIL)continue;
if(entry.key.equals(Accou
nt)){
Object Value =
entry.value; entries[j] =
NIL;
size--;
return Value;
return null;
class CryptoUtil
Cipher
ecipher;
Cipher
dcipher;
// 8-byte Salt
byte[] salt =
(byte) 0x03
};
// Iteration count
public CryptoUtil() {
/**
* @throws java.security.spec.InvalidKeySpecException
* @throws javax.crypto.NoSuchPaddingException
* @throws java.security.InvalidKeyException
* @throws java.security.InvalidAlgorithmParameterException
* @throws java.io.UnsupportedEncodingException
* @throws javax.crypto.IllegalBlockSizeException
* @throws javax.crypto.BadPaddingException
*/
plainText) throws
NoSuchAlgorithmException,
InvalidKeySpecException,
NoSuchPaddingException,
InvalidKeyException,
InvalidAlgorithmParameterException,
UnsupportedEncodingException,
IllegalBlockSizeException,
BadPaddingException {
//Enc process
ecipher = Cipher.getInstance(key.getAlgorithm());
ecipher.init(Cipher.ENCRYPT_MODE, key,
byte[] in =
plainText.getBytes(charSet); byte[]
out = ecipher.doFinal(in);
/**
* @throws java.security.NoSuchAlgorithmException
* @throws java.security.spec.InvalidKeySpecException
* @throws javax.crypto.NoSuchPaddingException
* @throws java.security.InvalidKeyException
* @throws java.security.InvalidAlgorithmParameterException
* @throws java.io.UnsupportedEncodingException
* @throws javax.crypto.IllegalBlockSizeException
* @throws javax.crypto.BadPaddingException
*/
InvalidKeySpecException,
NoSuchPaddingException,
InvalidKeyException,
InvalidAlgorithmParameterException,
UnsupportedEncodingException,
IllegalBlockSizeException,
BadPaddingException,
IOException {
decr dcipher =
Cipher.getInstance(key.getAlgorithm());
dcipher.init(Cipher.DECRYPT_MODE, key,
Base64.getDecoder().decode(encryptedText);
class PasswordGenerator {
+) {
password.append(dic.charAt(index));
return password.toString();
}
}
interface hashTableMap {
Account);
JFrame frame;
JFrame frame2;
JLabel
background;
Container
conn1,conn2; JLabel
lAcc,lPass;
JButton
addNoteBtn; JLabel
addNoteLabel;
JTextArea tNote;
JButton addNote;
JFrame conn3;
ArrayList<String> notes = new ArrayList<>(); // to store the notes in an array list of string type
@Override
//Frame settings
frame){ frame.setVisible(true);
frame.setLayout(null);
frame.setLocationRelativeTo(null);
//container settings
conn.setVisible(true);
conn.setBackground(Color.getHSBColor(20.4f, 10.5f,
12.9f)); conn.setLayout(null);
// buttons settings
btn.setBackground(new Color(0XFB2576));
btn.setForeground(Color.WHITE);
btn.setBorder(BorderFactory.createLineBorder(Color.BLA
Cursor(Cursor.HAND_CURSOR);
btn.setCursor(crs);
FrameGUI(frame2);
conn2 = frame2.getContentPane();
ContainerGUI(conn2);
lAcc.setFont(fn);
conn2.add(lAcc);
tAcc.setBounds(90,70,200,5
0); tAcc.setFont(fn);
tAcc.setBorder(BorderFactory.createLineBorder(Color.BLA
conn2.add(tAcc);
conn2.add(lPass);
tPass.setBounds(90,200,200,50);
tPass.setFont(fn);
tPass.setBorder(BorderFactory.createLineBorder(Color.BLA
conn2.add(tPass);
conn2.add(AccAddBtn);
GUIButtonsSetting(AccAddBtn);
TA.setText(Pass);
Font.BOLD, 20);
TA.setWrapStyleWord(true);
TA.setLineWrap(true);
TA.setCaretPosition(0);
TA.setEditable(false);
TA.setFont(fn);
PasswordManager() {
frame = new JFrame("Password Manager");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLO
SE); frame.setSize(400,650);
frame.setResizable(false);
ImageIcon("background.png"); background =
new JLabel("",img,JLabel.CENTER);
background.setBounds(0,0,400,650);
background.setVisible(true);
frame.add(background);
FrameGUI(frame);
conn1 = frame.getContentPane();
ContainerGUI(conn1);
40); conn1.add(PassGeneBtn);
GUIButtonsSetting(PassGeneBtn);
//generating password
PassGeneBtn.addActionListener(e ->
{ if(PassGeneBtn ==e.getSource())
try{
length")); if(len>4)
{
// password generator class reference
JTextArea(5,4); textArea(passwd,genePassArea);
catch(Exception ex)
{JOptionPane.showMessageDialog(conn1,"Write
something","EXIT!",JOptionPane.ERROR_MESSAGE);}
);
conn1.add(EncryptBtn);
GUIButtonsSetting(EncryptBtn);
EncryptBtn.addActionListener(e -> {
if(EncryptBtn ==e.getSource())
try{
CryptoUtil();
catch(Exception ex)
{JOptionPane.showMessageDialog(conn1,"Write
something","EXIT!",JOptionPane.ERROR_MESSAGE);}
);
40); conn1.add(DecryptBtn);
GUIButtonsSetting(DecryptBtn);
DecryptBtn.addActionListener(e -> {
if(DecryptBtn ==e.getSource())
try{
JOptionPane.showMessageDialog(conn1,new JScrollPane(genePassArea),"Decrypted
text",JOptionPane.INFORMATION_MESSAGE); // showing the decrypted text
catch(Exception ex)
{JOptionPane.showMessageDialog(conn1,"Write
something","EXIT!",JOptionPane.ERROR_MESSAGE);}
);
conn1.add(PassStoreBtn);
GUIButtonsSetting(PassStoreBtn);
PassStoreBtn.addActionListener(e -> {
if(PassStoreBtn ==e.getSource())
try{
StoringGUI();
AccAddBtn.addActionListener(e4 -> {
if (AccAddBtn == e4.getSource()) {
the password
else{
Successfully !");
tAcc.setText(null);
tPass.setText(null);
);
);
//searching password
PASSWORD"); GUIButtonsSetting(PassSearchBtn);
PassSearchBtn.addActionListener(
e ->{
if (PassSearchBtn
==e.getSource()){ try{
JOptionPane.showMessageDialog(conn1,"Write something","EXIT",JOptionPane.ERROR_MESSAGE);
);
// deleting password
GUIButtonsSetting(PassDeleteBtn);
conn1.add(PassDeleteBtn);
PassDeleteBtn.addActionListener(e -> {
if (PassDeleteBtn == e.getSource()) {
try {
if (!acc_name.isBlank()) {
);
GUIButtonsSetting(addNoteBtn);
conn1.add(addNoteBtn);
addNoteBtn.addActionListener(e -> {
if (addNoteBtn ==
e.getSource()) { try {
NoteGUI();
addNote.addActionListener(e4 -> {
if (addNote == e4.getSource()) {
} else {
conn3.setVisible(false);
tNote.setText(null);
});
);
NOTE"); GUIButtonsSetting(getNoteBtn);
conn1.add(getNoteBtn);
getNoteBtn.addActionListener(e -> {
if (getNoteBtn ==
e.getSource()) { try {
empty or not
JOptionPane.showMessageDialog(conn1, "No note found!", "INFO",
JOptionPane.INFORMATION_MESSAGE); // showing the message
} else {
area
);
conn3.setSize(500, 500);
conn3.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
conn3.setLocationRelativeTo(null);
conn3.setLayout(null);
conn3.setVisible(true);
conn3.setResizable(false);
conn3.add(addNoteLabel);
conn3.add(tNote);
GUIButtonsSetting(addNote);
conn3.add(addNote);
main(String[] args) {
//loading screen
class new
SplashScreen(); try
new PasswordManager();
}
OUTPUT
CONCLUSION
These days, password managers are the most underappreciated software.
Though they are more important than ever, people do not realize how much they
need them. The number of hacking attempts is increasing daily and will continue
to rise in the future if nothing is done. Businesses are making every effort to
safeguard their servers against these intrusions, but users remain susceptible
when they use easy-to-crack passwords. A large number of recent hacking
attempts have come from usergenerated content. The only way to help these
users remember complex passwords is to use password managers. We want to
raise awareness of this crucial software and make the code available as open-
source so that personal security continues to advance just a little bit in the future.
REFERANCE
1. https://copyassignment.com/password-and-notesmanager-in-java/
2. https://www.w3counter.com/globalstats.php
3. https://www.tutorialspoint.com/html5/html5_index eddb.htm
4. https://www.html5rocks.com/en/tutorials/file/filesy stem/
5. http://canadiancloudbackup.com/safe-safe-aes-256- encryption-data/