NB : untuk mencari karekter Enkripsi ketikan di kolom Plainteks
untuk mencari karekter Deskripsi ketikan di kolom Chiperteks
Listing Programnya :
Public Class Form1
Private Sub BtEnkripsi_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BtnEnkripsi.Click
Dim
jumlah As Double
= Len(Plainteks.Text)
Dim x As String
Dim
xkalimat As String
= ""
Dim bil
As Integer
Dim i As Double
For i =
1 To jumlah
x = Mid(Plainteks.Text, i, 1)
bil = Asc(x) + 3
x = Chr(bil)
xkalimat = xkalimat + x
Next i
Chiperteks.Text = xkalimat
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Chiperteks.Text = ""
Plainteks.Text = ""
End Sub
Private Sub BtnDiskripsi_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BtnDiskripsi.Click
Dim
jumlah As Double
= Len(Chiperteks.Text)
Dim x As String
Dim
xkalimat As String
= ""
Dim bil
As Integer
Dim i As Double
For i =
1 To jumlah
x = Mid(Chiperteks.Text, i, 1)
bil = Asc(x) - 3
x = Chr(bil)
xkalimat = xkalimat + x
Next i
Plainteks.Text = xkalimat
End Sub
End Class
Berikut Hasilnya :
Hasil Gambar untuk Enkripsi
Hasil Gambar untuk Deskripsi
Tidak ada komentar