question1 : i am trying to use the username the user register as a key however i cant apply the key to the textbox where they fill it in. is there any way to make it to a=0 b=1 and etc...
question 2 : i am using AscII table to add both the password and username to a encrypted password. but it always end up in some text that is not on the keyboard. this mean i cant decrypt it manually. how can i code it such as it only remain on A-Z
CODE
Public Class Form1
Dim s1 As String
Dim key As String
Dim cAsc As String
Dim newpass As String
Dim mystring As String
Dim kAsc As String
Dim A As Integer
Dim N As Integer
Dim i As Integer
Dim m As Integer
Const Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
mystring = ""
If Password.Text = "" Then
MsgBox("Enter ID")
Else
Dim mykey As Integer
Dim VSquare(25) As String
N = Len(Username.Text)
For m = 1 To N
For mykey = 0 To 25
VSquare(mykey) = Alphabet.Substring(mykey, 1)
Key = (Username.Text.ToUpper.Substring(m - 1, 1))
kAsc = Asc(Key)
Next
Next m
A = Len(Password.Text)
For i = 1 To A
s1 = Password.Text.ToUpper.Substring(i - 1, 1)
cAsc = Asc(s1) + kAsc
newpass = Chr(cAsc)
mystring = mystring + newpass
Next i
End If
End Sub
End Class