Is anybody know what is the easiest way to encrypt and decrypt text from textbox? Thank you in advance. Good day!
iampord
0
Newbie Poster
Recommended Answers
Jump to PostYou said "easy", correct?:D
'// encrypt. Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click With TextBox1 .Text = .Text.Replace("a", "z").Replace("b", "y").Replace("c", "x") End With End Sub '// decrypt. Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click With TextBox1 .Text = .Text.Replace("z", "a").Replace("y", "b").Replace("x", …
Jump to PostSee if this helps.
Public Class Form1 Private arLetterChars() As Char = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 " Private arEncryptedChars() As Char = "¿s¢çc‹i˜Ö´åÄÚKÍìæ¯~4Ûÿ5ÑûÏÉí³èô§ŠÀÙ9ÒÓ?þ.äƒ%*š¾†±HI2@æŒ," '// encrypt. Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click With TextBox1 For Each myTextBoxChar As Char In .Text '// loop thru TextBox, one char. …
All 7 Replies
codeorder
197
Nearly a Posting Virtuoso
djjavo
0
Light Poster
codeorder
197
Nearly a Posting Virtuoso
debasisdas
commented:
agree
+13
djjavo
0
Light Poster
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
iampord
0
Newbie Poster
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.