Password Manager

Password Manager

You don't have to remember all your passwords anymore! This is a CLI Password Manager.

Password Manager

Password Manager

You don't have to remember all your passwords anymore! This is a CLI Password Manager.

The problem Password Manager solves

Password Manager stores the username, the corresponding password and the sites for which the username and password are used in a database. The Password Items in this database can be accessed by using the master password. The master password is a string that can be used to fetch the passwords. This is helpful because users have to just remember one master password that will let them access all their other passwords, rather than remembering several passwords.
The data in the database are encrypted using Symmetric Encryption so that people can't access the password. Even if they do, they won't be able to understand as the data would be scrambled. This way, the passwords are also safe and cannot be accessed for malicious purposes.
It supports all the CRUD(Create, Read, Update and Delete) operations. In other words, users can Add new Password Items, they can Retrieve the Password Items, they can Update the passwords, and they can also Delete Password Items.
If the user forgets the Master Password, there is NO way of using the database again. The user will have to create a new account.
This Password Manager also gives users an option to generate Random Passwords. The user can specify the length of the Randomly Generated Password and the Random Password will be generated and can be used. The Randomly Generated Password contains characters from the following character set:

  • Set of all Uppercase Letters
  • Set of all Lowercase Letters
  • Set of all Digits
  • The Special Characters *@, #, $, %, , &

If the binary is run without any arguments, it implies that the user wants to create a new account.
If the binary is run with 2 or more arguments, the 1st argument is the username and the 2nd argument is the master password.
Note: I used some functions for the database queries from my other project. I also referred to some websites when I ran into bugs.

Challenges I ran into

  1. I got a lot of errors when I was running the SQL queries. The reason turned out to be some silly mistakes from my side which caused memory leaks.
  2. I wanted to lock the database file with a password so that attackers can't access it. But I couldn't figure out how to do it. So I encrypted the data in the file so that even if attackers get access to the database, they won't be able to make sense of the data in the file.
  3. After I added the Database Encryption, I noticed some wrong behaviour in the code. This was because I didn't do the int to string conversion correctly. I searched on google how to perform it correctly and made the necessary changes.
  4. I faced some issues while trying to upload the code to Github. I got an error that gpg keys didn't exist although I created them. I referred some websites like askubuntu.com, stackoverflow.com etc to figure how to solve it.

Tracks Applied (1)

Replit

Replit allows us to run and deploy Go projects. So I used it to run my code.

Replit

Discussion