Kamis, 23 Mei 2013

PROGRAM VB KRIPTOGRAFI ENKRIPSI

Public Class Form1
   
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        PT.Text = " "
        CT.Text = " "
    End Sub

    Private Sub BTNENKRIPSI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNENKRIPSI.Click
        Dim jumlah As Double = Len(PT.Text)
        Dim x As String
        Dim xkalimat As String = " "
        Dim i As Double
        Dim bil As Integer
        For i = 1 To jumlah
            x = Mid(PT.Text, i, 1)
            bil = Asc(x) + 3
            x = Chr(bil)
            xkalimat = xkalimat + x
        Next i
        CT.Text = xkalimat
    End Sub
End Class













Tidak ada komentar:

Posting Komentar