tabel kriptografi caiser chiper
langkah pengerjaannya;
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
plaintext.Text = ""
chipertext.Text = ""
End Sub
Private Sub btnenskipsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnenskipsi.Click
Dim x As String
Dim bil As Integer
chipertext.Text = ""
For i = 1 To Len(plaintext.Text)
x = Microsoft.VisualBasic.Mid(plaintext.Text, i, 1)
bil = Asc(x)
bil = bil + 3
x = Chr(bil)
chipertext.Text = chipertext.Text & x
Next
End Sub
Private Sub btndeskripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndeskripsi.Click
Dim x As String = ""
Dim xkalimat As String = ""
For i = 1 To Len(chipertext.Text)
x = Mid(chipertext.Text, i, i)
x = Chr(Asc(x) - 3)
xkalimat = xkalimat + x
Next
plaintext.Text = xkalimat
End Sub
End Class
sekianlah kriptografi caiser chiper ini saya buat semoga bermanfaat bagi kita semua
Tidak ada komentar:
Posting Komentar