Selamat datang di BLOGchanif.com

Membuat Program Aplikasi Enkripsi Kriptografi Vernam Pada VB.Net

Sunday, January 12, 20140 komentar

Assalamu'alaikum..

Kali ini saya akan berbagi kepada anda tentang cara Membuat Program Aplikasi Enkripsi Kriptografi Vernam Pada VB.Net. Aplikasi Enkripsi Kriftografi Vernam bertujuan untuk menyamarkan id kita saat kita membuat akun disebuah web atau program.

Berikut ini adalah tampilan Aplikasi Enkripsi Kriptografi Vernam :


Listing Program:

    Public Class Enkripsi_Kriftografi_Vernam
        Private Sub Enkripsi_Kriftografi_Vernam_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            plainteks.Text = ""
            kunci.Text = ""
            chiperteks.Text = ""
        End Sub
        Private Sub bntenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntenkripsi.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 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
    End Class
    Demikianlah Artikel saya tentang Membuat Program Aplikasi Enkripsi Kriptografi Vernam Pada VB.Net . Semoga Artikel diatas dapat bermanfaat bagi para pembaca.
    Wassalamu'alaikum. Wr. Wb.
Share this article :

Post a Comment

 
Support : Cara Gampang | Resep Masakan Kampung | Johny Template | Mas Templatea | Mesran[dot]Net
Copyright © 2011. BLOGchanif.com - All Rights Reserved
Template Created by Creating Website Modify by CaraGampang.Com
Proudly powered by Blogger