KERIPTOGRAFI CAESAR
ENKRIPSI
INPUT
PROGRAM
Public Class Form1
Private Sub BtnEnkripsi_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgsa) Handles BtnEnkripsi.Click
chiper.Text = ""
Dim x As String
Dim bil As Integer
For i =
1 To Len(plain.Text)
x =
Microsoft.VisualBasic.Mid(plain.Text, i, 1)
bil = Asc(x)
bil = bil + 3
x = Chr(bil)
chiper.Text = chiper.Text & x
Next i
End Sub
End Class
OUTPUT
DEKRIPSI
INPUT
PROGRAM
Public Class Form1
Private Sub btndkripsi_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btndkripsi.Click
chiper.Text = ""
Dim x As String
Dim bil
As Integer
For i =
1 To Len(plaint.Text)
x =
Microsoft.VisualBasic.Mid(plaint.Text, i, 1)
bil = Asc(x)
bil = bil - 3
x = Chr(bil)
chiper.Text = chiper.Text & x
Next i
End Sub
End Class
OUTPUT
Tidak ada komentar:
Posting Komentar