hello dear readers , now i am up with a simple encryption decryption tutorials in vb.net by the way i am not going to use any classes like RC4,RSA,etc i just wrote the simple method to understand how encryption and encryption works . read how encryption works here and you know what is decryption if there's anyone who don't know what is decryption , decryption make a protected code or whatever visible you can read about that in some other websites ok now lets move to the main part now create a new project and when your form finishes loading add two textboxes and two buttons now place the text box 1 in the top of the form and place the text box2 in the bottom of the form now the textbox1 is for text to input and the textbox2 is for text to output so now change the text of the button 1 to encrypt and the other button to decrypt as you can see how all the controls are arranged in the picture . now double click the form and add this codes ...
Public Class Form1
'Author : Mohamed Shimran
'Blog : http://www.ultimateprogrammingtutorials.blogspot.com
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b, c, d, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, α, β, γ, δ, ζ, η, θ, ι, ù, κ, λ, μ, ν, ο, ρ, φ, π, ς, τ, υ, à, ω, χ, ψ, σ As String
Dim encrypt As String
a = "a"
b = "b"
c = "c"
d = "d"
f = "f"
g = "g"
h = "h"
i = "i"
j = "j"
k = "k"
l = "l"
m = "m"
n = "n"
o = "o"
p = "p"
q = "q"
r = "r"
s = "s"
t = "t"
u = "u"
v = "v"
w = "w"
x = "x"
y = "y"
z = "z"
encrypt = TextBox1.Text
encrypt = Replace(encrypt, a, "α")
encrypt = Replace(encrypt, b, "β")
encrypt = Replace(encrypt, c, "γ")
encrypt = Replace(encrypt, d, "δ")
encrypt = Replace(encrypt, f, "ζ")
encrypt = Replace(encrypt, g, "η")
encrypt = Replace(encrypt, h, "θ")
encrypt = Replace(encrypt, i, "ι")
encrypt = Replace(encrypt, j, "ù")
encrypt = Replace(encrypt, k, "κ")
encrypt = Replace(encrypt, l, "λ")
encrypt = Replace(encrypt, m, "μ")
encrypt = Replace(encrypt, n, "ν")
encrypt = Replace(encrypt, o, "ο")
encrypt = Replace(encrypt, p, "ρ")
encrypt = Replace(encrypt, q, "φ")
encrypt = Replace(encrypt, r, "π")
encrypt = Replace(encrypt, s, "ς")
encrypt = Replace(encrypt, t, "τ")
encrypt = Replace(encrypt, u, "υ")
encrypt = Replace(encrypt, v, "à")
encrypt = Replace(encrypt, w, "ω")
encrypt = Replace(encrypt, x, "χ")
encrypt = Replace(encrypt, y, "ψ")
encrypt = Replace(encrypt, z, "σ")
TextBox2.Text = encrypt
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim α, β, γ, δ, ζ, η, θ, ι, ù, κ, λ, μ, ν, ο, ρ, φ, π, ς, τ, υ, à, ω, χ, ψ, σ As String
Dim decrypt As String
φ = "φ"
π = "π"
ς = "ς"
τ = "τ"
υ = "υ"
à = "à"
ω = "ω"
χ = "χ"
ψ = "ψ"
σ = "σ"
α = "α"
β = "β"
γ = "γ"
δ = "δ"
ζ = "ζ"
η = "η"
θ = "θ"
ι = "ι"
ù = "ù"
κ = "κ"
λ = "λ"
μ = "μ"
ν = "ν"
ο = "ο"
ρ = "ρ"
decrypt = TextBox1.Text
decrypt = Replace(decrypt, α, "a")
decrypt = Replace(decrypt, β, "b")
decrypt = Replace(decrypt, γ, "c")
decrypt = Replace(decrypt, δ, "d")
decrypt = Replace(decrypt, ζ, "f")
decrypt = Replace(decrypt, η, "g")
decrypt = Replace(decrypt, θ, "h")
decrypt = Replace(decrypt, ι, "i")
decrypt = Replace(decrypt, ù, "j")
decrypt = Replace(decrypt, κ, "κ")
decrypt = Replace(decrypt, λ, "l")
decrypt = Replace(decrypt, μ, "m")
decrypt = Replace(decrypt, ν, "n")
decrypt = Replace(decrypt, ο, "o")
decrypt = Replace(decrypt, ρ, "p")
decrypt = Replace(decrypt, φ, "q")
decrypt = Replace(decrypt, π, "r")
decrypt = Replace(decrypt, ς, "s")
decrypt = Replace(decrypt, τ, "t")
decrypt = Replace(decrypt, υ, "υ")
decrypt = Replace(decrypt, à, "v")
decrypt = Replace(decrypt, ω, "w")
decrypt = Replace(decrypt, χ, "x")
decrypt = Replace(decrypt, ψ, "y")
decrypt = Replace(decrypt, σ, "z")
TextBox2.Text = decrypt
End Sub
End Class
now debug and see how it works and let me know what you think and if there's any errors let me know
2 comments
Nice job. Love how you did it. Very simple but efficient!
ReplyThanks :) yes this is a cool program and it cannot be decrypted by others if you use other characters or mixed characters with my characters
Replyφ = "φ"
π = "π"
ς = "ς"
τ = "τ"
υ = "υ"
à = "à"
ω = "ω"
χ = "χ"
-Shim
Post a Comment
Note: Only a member of this blog may post a comment.