I'm sure I'm not the first to ask something like this, but I haven't been able to find anything useful so I'm posting this to get your help, thank you.
I'm trying to create an app to store some user data. I'm using sqlite to keep track of everything. The idea is that a user can create their own login. The login password will be hashed and the cipher kept in the db. The user should be able to use that hashed password as a private key to encrypt/decrypt other data they enter into the app. The data is stored locally on their computer so I don't want anyone to just open up the db and view all the user's info that's why I need to encrypt/decrypt that data during run time. I don't know how to write something like this. Can anyone give me some suggestions on where to start. I can't find any Qt class that would allow for encryption/decryption during run time. For the hash I was thinking of using QCryptographicHash, but can't figure out how to properly do that with a password. Would anyone mind showing me what the syntax for that would be? Do I need to import any libraries or should I be using only the qt functions? Anyway, I would really appreciate any help with this because it's the part I'm stuck on and can't finish my app without this feature.
Also, the encryption needs to be strong enough to store sensitive data like social security numbers or credit card numbers.
Edit: I'm aware that this isn't very secure, but for now I just need to have the password hashed and the data encrypted. I'm going to work on making it more secure later like adding 2 factor authorization.
Bookmarks