Game

http://modoo.netmarble.co.id/Download/download_gamedownload.aspx

Pages

Sabtu, 29 Juni 2013

Kriptografi enkripsi












LISTING PROGRAM CAESAR_CHIPER













coding :

Public Class Caesar_chiper

    Private Sub Caesar_chiper_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Plainteks.Text = ""
        Chiperteks.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(Plainteks.Text)
        Dim x As String
        Dim xkalimat As String = ""
        Dim bil As Integer
        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 btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
        End

    End Sub

    Private Sub Btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnhapus.Click
        Chiperteks.Text = ""
        Plainteks.Text = ""

    End Sub

    Private Sub Btnkembali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkembali.Click
        Me.Hide()
        Formkriptografi.Show()

    End Sub
End Class

LISTING PROGRAM GRONSFELD_CHIPER

















coding :

Public Class Gronsfeld

    Private Sub btnkembali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkembali.Click
        Me.Hide()
        Formkriptografi.Show()

    End Sub

    Private Sub Btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkeluar.Click
        End

    End Sub

    Private Sub Gronsfeld_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Plainteks.Text = ""
        Chiperteks.Text = ""

    End Sub

    Private Sub Btnenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnenkripsi.Click
        Dim J As Integer
        Dim Jum As Integer
        Dim sKey As String
        Dim nKata As Integer
        Dim nKunci As String
        Dim sKata As String
        Dim sPlain As String = ""
        Dim nEnc As Integer
        J = 0
        sKata = Plainteks.Text
        Jum = Len(sKata)
        sKey = Kunci.Text
        For i = 1 To Jum
            If J = Len(sKey) Then
                J = 1
            Else
                J = J + 1
            End If
            nKata = Asc(Mid(sKata, i, 1)) - 65
            nKunci = Asc(Mid(sKey, J, 1)) - 65
            nEnc = ((nKata + nKunci) Mod 26)
            sPlain = sPlain & Chr((nEnc))
        Next i
        Chiperteks.Text = sPlain
    End Sub

    Private Sub Btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnhapus.Click
        Plainteks.Text = ""
        Chiperteks.Text = ""
        Kunci.Text = ""
    End Sub

    Private Sub Plainteks_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Plainteks.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

    Private Sub Plainteks_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Plainteks.TextChanged

    End Sub

    Private Sub Kunci_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Kunci.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

    Private Sub Kunci_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kunci.TextChanged

    End Sub
End Class

 LISTING PROGRAM VERNAM­_CHIPER
















coding :

Public Class Vernam_chiper

    Private Sub btnkembali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkembali.Click
        Me.Hide()
        Formkriptografi.Show()

    End Sub

    Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
        End

    End Sub

    Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
        Plainteks.Text = ""
        kunci.Text = ""
        Chiperteks.Text = ""


    End Sub

    Private Sub Vernam_chiper_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Plainteks.Text = ""
        Chiperteks.Text = ""
        kunci.Text = ""



    End Sub
    Private Sub btnenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnenkripsi.Click
        Dim J As Integer
        Dim Jum As Integer
        Dim sKey As String
        Dim nKata As Integer
        Dim nKunci As Integer
        Dim sKata As String
        Dim sPlain As String = ""
        Dim nEnc As Integer
        J = 0
        sKata = Plainteks.Text
        Jum = Len(sKata)
        sKey = kunci.Text
        For i = 1 To Jum
            If J = Len(sKey) Then
                J = 1
            Else
                J = J + 1
            End If
            nKata = Asc(Mid(sKata, i, 1)) - 65
            nKunci = Asc(Mid(sKey, J, 1)) - 65
            nEnc = ((nKata + nKunci) Mod 26)
            sPlain = sPlain & Chr((nEnc) + 65)
        Next i
        Chiperteks.Text = sPlain

    End Sub

    Private Sub Plainteks_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Plainteks.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

    Private Sub Plainteks_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Plainteks.TextChanged

    End Sub

    Private Sub kunci_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles kunci.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

    Private Sub kunci_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kunci.TextChanged

    End Sub
End Class

 LISTING PROGRAM VIGENERE_CHIPER
















coding :

Public Class Vigenere_chiper

    Private Sub Btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnhapus.Click
        Plainteks.Text = ""
        Chiperteks.Text = ""
        kunci.Text = ""


    End Sub

    Private Sub Btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkeluar.Click
        End

    End Sub

    Private Sub Btnkembali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkembali.Click
        Me.Hide()
        Formkriptografi.Show()

    End Sub

    Private Sub Vigenere_chiper_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Plainteks.Text = ""
        Chiperteks.Text = ""

    End Sub

    Private Sub Btnenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnenkripsi.Click
        Dim J As Integer
        Dim Jum As Integer
        Dim sKey As String
        Dim nKata As Integer
        Dim nKunci As Integer
        Dim sKata As String
        Dim sPlain As String = ""
        Dim nEnc As Integer
        J = 0
        sKata = Plainteks.Text
        Jum = Len(sKata)
        sKey = kunci.Text
        For i = 1 To Jum
            If J = Len(sKey) Then
                J = 1
            Else
                J = J + 1
            End If
            nKata = Asc(Mid(sKata, i, 1)) + 0
            nKunci = Asc(Mid(sKey, J, 1)) + 0
            nEnc = ((nKata + nKunci) Mod 256)
            sPlain = sPlain & Chr((nEnc))
        Next i
        Chiperteks.Text = sPlain


    End Sub

    Private Sub Plainteks_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Plainteks.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub
    Private Sub Plainteks_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Plainteks.TextChanged

    End Sub

    Private Sub kunci_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles kunci.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

    Private Sub kunci_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kunci.TextChanged

    End Sub
End Class

 LISTING PROGRAM RC_4 CHIPER








 

Blogger news

Blogroll

About