Closed akshgpt7 closed 4 years ago
Do you mean encrypt text to binary?
Yes, open the password.txt file in write binary mode and then write it. Also, make sure it is checked correctly when user enters a password.
If I understand correct:
Yes, that is what is needed.
Basically, the current problem is that the password is visible in the text file. If it is stored in binary encrypted form, it'll not be that obvious to look at.
So, rather than opening the file in w
mode, use wb
mode when someone changes the password.
Similarly, rb
mode for reading.
Hello, I want to contribute. Is it fine to encode password to base64?
Yes, that would do. Go ahead!
Fixed by #8
Currently, the password is stored as plain text. Using a binary mode to store will make it safer.