Basic Encryption Sequence Using Xor

Submitted by:Jhon Jhon

Date added:02 July, 2014

Category:Visual Basic

Copy the declarations and code below and paste directly into your VB project.

Tags: encrypt , basic encryption

Code Snippet:

Public Class Form1

Private Sub EncryptDecrypt()
Dim I As Integer, Character As Char, Temp1 As String = ""
For I = 0 To txtText.TextLength - 1
Character = txtText.Text.Chars(I)
Temp1 += Chr(Asc(Character) Xor 128)
Next I
txtText.Text = Temp1
End Sub

' txtText is the textbox that the encrypted message is showed. You can change this of course

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
End Class