Cryptography in VB.NET 2008

Tuesday, November 16, 2010 by: Andy Kurnia Prayoga Made

Description: This program was made with the programming language visual basic 2008. The program I give the name "Ende-Crypt". The objective of this program is for encryption and decryption of a word. This is certainly very closely related to the previous program (URLMemory) where the password of an account can we go back for encryption and decryption of data security of our passwords more secure. With standard control facilities from VB 2008 such as textbox and button are able to form this program. Here's the source code of this program. Good luck!

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Enkrip, Output, Inputan As String
        Dim Panjang_Input As Integer
        Inputan = TextBox1.Text
        Panjang_Input = Len(TextBox1.Text)
        For i = 1 To Panjang_Input
            Enkrip = Mid(Inputan, i, 1)
            Enkrip = Asc(Enkrip)
            Enkrip = (Enkrip + 7) - 11
            Enkrip = Chr(Enkrip)
            Output = Output & Enkrip
        Next i
        TextBox2.Text = Output
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim Dekrip, Output, Inputan As String
        Dim Panjang_Input As Integer
        Inputan = TextBox3.Text
        Panjang_Input = Len(TextBox3.Text)
        For i = 1 To Panjang_Input
            Dekrip = Mid(Inputan, i, 1)
            Dekrip = Asc(Dekrip)
            Dekrip = (Dekrip - 7) + 11
            Dekrip = Chr(Dekrip)
            Output = Output & Dekrip
        Next i
        TextBox4.Text = Output
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""

    End Sub

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

End Class 

Filed under: