Introduction
Encrypt Me! is a Simple Cryptography Application Which uses Ceaser Cipher Algorithm to Encrypt and Decrypt the Message.
Screenshots
Source Code
Splash Screen
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
Label2.Text = ProgressBar1.Value
If ProgressBar1.Value = 100 Then
Home.Show()
Me.Close()
End If
End Sub
End Class
Main Code
Public Class Home
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Application.Exit()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MessageBox.Show("Developer : Kshitij Bombarde")
End Sub
Function EncryptDecrypt(ByVal text1 As String, ByVal key As String, ByVal isEncrypt As Boolean) As String
Dim char1 As String
Dim char2 As String
Dim cKey As Byte
Dim strLength As Integer
Dim Result As String = ""
Dim j As Integer = -1
If text1 <> "" And IsNumeric(key) Then
strLength = text1.Length
For i As Integer = 0 To strLength - 1
char1 = text1.Substring(i, 1)
If j < key.Length - 1 Then
j = j + 1
Else
j = 0
End If
cKey = Val(key.Substring(j, 1))
If isEncrypt Then
char2 = Chr(Asc(char1) + cKey)
Else
char2 = Chr(Asc(char1) - cKey)
End If
Result &= char2
Next
Else
MsgBox("Enter text or key!")
End If
Return Result
End Function
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
txtResult.Text = EncryptDecrypt(txtText.Text, txtKey.Text, True)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
txtResult.Text = EncryptDecrypt(txtText.Text, txtKey.Text, False)
End Sub
End Class
Demo of the Final Application
Subscribe to My Youtube....




Comments
Post a Comment