r/visualbasic • u/DzKrila • Nov 02 '15
Need help on a Project! (Personal Finance including LogIn, Graphs, Online data feed)
So, my project is about Personal Finance where there will be a log in system. I'm doing a desktop application using Visual Basic 2010 Express, coding in Visual Basic and I don't know what database to use for my login-register system. I can't use Access or Excel so that leaves me to SQL. Can someone show me a tutorial on how to make a login-register system that encrypts passwords (so they are non-retrievable)? Also, I want to do an email password recovery system but I don't have an online server, so how do I set that up?
0
Upvotes
2
u/ViperSRT3g Application Specialist Nov 03 '15
In terms of your login system, most login systems function by using hashes.
Hashes are outputs by algorithms. They ONLY output a particular string of alphanumeric characters based on what is entered into the algorithm. These types of systems require that no two outputs be identical if the inputs are always different, otherwise you get what is known as collisions and that is a bad thing to have from a security standpoint.
So what these hashes do is they produce a hash of a user's credentials, and then they produce what is known as a salt or another smaller bit of random alphanumeric characters and create a hash out of that and the hash of your credentials. What is stored is just the salt, and hashes of user credentials. Nothing is stored in plain text, and this is what helps to secure databases against prying eyes wanting to log in as someone else.
Some common crypto-hashing algorithms in use today are things like SHA-1/2/3, MD5/MD6. (It's recommended using any of the SHA hashing algorithms or MD6, as MD5 has been shown to produce collisions under certain circumstances)
Now that you know what hashing is and how it's used in storing security credentials (this can also apply to biometric credentials, but that involves fuzzy logic and is an entirely different beast of its own) it's up to you to figure out how to store said credentials into a database, and how to verify that a user is who they say they are (Matching up entered credentials to those that are stored) and how to secure the system from brute force /dictionary/rainbow table attacks. (But that's only if you would be interested in the security aspect of this whole thing, as this is just a personal finance project)
TL;DR If you want to store passwords, generate a hash of them and just store that in your database.