Background Story:
I have a pop up screen that validates a registration file. This registration file is a text file using my custom file extension. The registration file contains info the user has entered in but it is encrypted and then sent to my web server where the info is validated every time the program loads.
The Excuse:
I am a complete novice and trying to fill some big coding gaps so please excuse my, most likely incorrect, long about way of coding.
The Forms:
Form 1
Two textboxes
Two buttons - Encrypts
Form 2
Two textboxes
One button - Decrypt
The Process:
In textbox1 you enter the password and click the "Commit" button. This disables changing the textbox values. Textbox2 is also populated with the "encrypted" value. The second button saves the result and is saved as a custom file.
The Problem(s)
The value in textbox2(encrypted) is going in sequential order.
Also, if I type the same letter twice it only accounts for 1 letter.
The Code and Example
If I typed aaccabc the result would be "001002003" instead of "001001003003001002003"
Can someone give me some advice or let me know my options in this being successful? I searched and have read everything I know to look for. I am to the point where I am now unsure what I should be looking for or be changing. Sorry for being so winded. Any help wold be greatly appreciated. Thank you.
Andrew
I have a pop up screen that validates a registration file. This registration file is a text file using my custom file extension. The registration file contains info the user has entered in but it is encrypted and then sent to my web server where the info is validated every time the program loads.
The Excuse:
I am a complete novice and trying to fill some big coding gaps so please excuse my, most likely incorrect, long about way of coding.
The Forms:
Form 1
Two textboxes
Two buttons - Encrypts
Form 2
Two textboxes
One button - Decrypt
The Process:
In textbox1 you enter the password and click the "Commit" button. This disables changing the textbox values. Textbox2 is also populated with the "encrypted" value. The second button saves the result and is saved as a custom file.
The Problem(s)
The value in textbox2(encrypted) is going in sequential order.
Also, if I type the same letter twice it only accounts for 1 letter.
The Code and Example
VB.NET:
dim a as string = "a"
dim apass as string = "001"
dim b as string = "b"
dim bpass as string = "002"
dim b as string = "c"
dim bpass as string = "003"
If TextBox1.Text.Contains(a) Then
TextBox2.AppendText(apass)
End If
If TextBox1.Text.Contains(b) Then
TextBox2.AppendText(bpass)
End If
If TextBox1.Text.Contains(c) Then
TextBox2.AppendText(cpass)
End If
If I typed aaccabc the result would be "001002003" instead of "001001003003001002003"
Can someone give me some advice or let me know my options in this being successful? I searched and have read everything I know to look for. I am to the point where I am now unsure what I should be looking for or be changing. Sorry for being so winded. Any help wold be greatly appreciated. Thank you.
Andrew