0% found this document useful (0 votes)
53 views3 pages

Password Manager Project

This project aims to develop a simple password manager implemented in Python that allows users to securely store and manage their passwords by employing encryption techniques to safeguard stored passwords, ensuring that even if the storage file is compromised, the passwords remain unreadable.

Uploaded by

suita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views3 pages

Password Manager Project

This project aims to develop a simple password manager implemented in Python that allows users to securely store and manage their passwords by employing encryption techniques to safeguard stored passwords, ensuring that even if the storage file is compromised, the passwords remain unreadable.

Uploaded by

suita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Password Manager Project:

Project Description:

This project is a simple password manager implemented in Python using the cryptography
library. It provides basic functionalities such as adding new passwords and viewing existing ones,
all while ensuring the security of stored passwords through encryption. Users can securely store
their account credentials and retrieve them as needed.

Statement of Problem:

In today's digital age, individuals often struggle to manage numerous passwords across various
online accounts securely. Memorizing passwords for each account can be challenging, leading to
the use of weak or repetitive passwords, which pose a significant security risk. Additionally,
storing passwords in plaintext files on local devices leaves them vulnerable to unauthorized
access.

To address these challenges, this project aims to develop a password manager that allows users
to securely store and manage their passwords. The password manager will employ encryption
techniques to safeguard stored passwords, ensuring that even if the storage file is compromised,
the passwords remain unreadable. The manager will offer functionalities for adding new
passwords and viewing existing ones, providing a convenient and secure solution for password
management.

Source code:

from cryptography.fernet import Fernet

'''

def write_key():

key = Fernet.generate_key()

with open("key.key", "wb") as key_file:

key_file.write(key)'''

def load_key():

file = open("key.key", "rb")

key = file.read()
file.close()

return key

key = load_key()

fer = Fernet(key)

def view():

with open('passwords.txt', 'r') as f:

for line in f.readlines():

data = line.rstrip()

user, passw = data.split("|")

print("User:", user, "| Password:",

fer.decrypt(passw.encode()).decode())

def add():

name = input('Account Name: ')

pwd = input("Password: ")

with open('passwords.txt', 'a') as f:

f.write(name + "|" + fer.encrypt(pwd.encode()).decode() + "\n")

while True:

mode = input(
"Would you like to add a new password or view existing ones (view, add), press q to quit?
").lower()

if mode == "q":

break

if mode == "view":

view()

elif mode == "add":

add()

else:

print("Invalid mode.")

continue

You might also like