Secure this login screen

stefonalfaro

Member
Joined
Dec 3, 2007
Messages
16
Programming Experience
Beginner
So Im trying to make a secure login. The password is hippP. How would I make this more secure? Because I think people would be able to crack this easily.



VB.NET:
        Dim a As Char = "h"
        Dim b As Char = "i"
        Dim c As Char = "p"
        Dim d As Char = "p"
        Dim f As Char = "P"

        If TextBox1.Text = (a & b & c & d & f) Then
            MsgBox("Correct Password")
        Else
            MsgBox("Wrong Password")
        End If
 
So Im trying to make a secure login. The password is hippP. How would I make this more secure? Because I think people would be able to crack this easily.



VB.NET:
        Dim a As Char = "h"
        Dim b As Char = "i"
        Dim c As Char = "p"
        Dim d As Char = "p"
        Dim f As Char = "P"

        If TextBox1.Text = (a & b & c & d & f) Then
            MsgBox("Correct Password")
        Else
            MsgBox("Wrong Password")
        End If

What is your goal here? If you are hardcoding the password alls it would take is decompiling your application to read the password. Depending on the size of your application, wouldn't take more than 10 mins.

If you want it to be secure, encrypt the password, store it in an xml file or database.
 
If I want to encrypt it would I need the XML file? or would I just do it in the actual code?

You don't NEED an xml file, but you would need to be reading the encrypted password from SOMEWHERE. You can not hard code your password in your program if you are looking for something "secure" as I said it would be extremely trivial to decompile your program and simply read the password.
 
You don't NEED an xml file, but you would need to be reading the encrypted password from SOMEWHERE. You can not hard code your password in your program if you are looking for something "secure" as I said it would be extremely trivial to decompile your program and simply read the password.

So I going to have learn some XML and the use of it with VB?
 
It doesn't have to be XML, it can be stored in a database, or even a text file.

The key is to ensure you do not store it as plain text, you should encrypt it before writing out to the text file.
 
Back
Top