TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Encrypt and Decrypt in C#
Pintoo Yadav
Jan 04
2015
Code
6.8
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
private
void
button1_Click(
object
sender, EventArgs e)
{
textBox2.Text = Convert.ToBase64String(Encoding.Unicode.GetBytes(textBox1.Text));
textBox1.BackColor = System.Drawing.Color.Yellow;
}
private
void
button2_Click(
object
sender, EventArgs e)
{
textBox3.Text = Encoding.Unicode.GetString(Convert.FromBase64String(textBox2.Text));
textBox3.BackColor = System.Drawing.Color.Yellow;
}
C#
Encrypt
Decrypt