Hello everybody. I'm making project for school and it includes a Vigenere Encipher. There are 3 textboxes. Enter the keyword in Textbox 1, Enter message in Textbox 2, Press button, Output displays in Textbox 3. The following code does the job.
But, this code shows the output in ASCII beyond the letter Z such as / * & ^. How can this code be modified to only show characters between a - z & A - Z. If I didn't explain it well enough, please let me know. I also don't know whether the solution is simple, but any help would be greatly appreciated. Thanks in advance!Code:Public Shared Function VIGEncrypt(ByVal cipherTxt As String, ByVal key As String) Dim encryptedText As String = "" For i As Integer = 1 To cipherTxt.Length Dim temp As Integer = Asc(GetChar(cipherTxt, i)) + Asc(GetChar(key, i Mod key.Length + 1)) encryptedText += Chr(temp) Next Return encryptedText End Function




Reply With Quote