Gambar
Listing Untuk Kriptografi
Public Class Form1
Private Sub btnenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnenkripsi.Click
Dim x As String
TextBox2.Text = ""
For i = 1 To Len(TextBox1.Text)
x = Microsoft.VisualBasic.Mid(TextBox1.Text, i, 1)
x = Chr(Asc(x) + 3)
TextBox2.Text = TextBox2.Text & x
Next i
End Sub
Private Sub btndeskripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndeskripsi.Click
Dim x As String
TextBox3.Text = ""
For i = 1 To Len(TextBox2.Text)
x = Microsoft.VisualBasic.Mid(TextBox2.Text, i, 1)
x = Chr(Asc(x) - 3)
TextBox3.Text = TextBox3.Text & x
Next i
End Sub
End Class
Hasil Gambar