Windows Forms: How to Encrypt and Decrypt a String in C#
By FoxLearn 6/2/2017 7:50:09 PM 7.19K
Encrypt/Decrypt string or password using Eramake.eCryptography library in C#
Step 1: Click New Project, then select Visual C# on the left, then Windows and then select Windows Forms Application. Name your project "EncryptDecryptDemo" and then click OK
Step 2: Right click on your project select Manage NuGet Packages -> Search eramake.ecryptography -> Install
Step 3: Design your form as below
Step 4: Add code to handle your form as below
using System; using System.Windows.Forms; namespace EncryptDecryptDemo { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btnEncrypt_Click(object sender, EventArgs e) { txtEncrypt.Text = Eramake.eCryptography.Encrypt(txtValue.Text); } private void btnDecrypt_Click(object sender, EventArgs e) { txtDecrypt.Text = Eramake.eCryptography.Decrypt(txtEncrypt.Text); } } }
VIDEO TUTORIALS
- How to Use Form Load and Button click Event in C#
- How to use Advanced Filter DataGridView in C#
- How to use TagListControl in C#
- How to use Error Provider in C#
- How to Drag and Drop controls in C#
- How to Create a Random Password Generator in C#
- How to make an Application auto run on Windows startup in C#
- How to Create a Wait Form Dialog in C#
Categories
Popular Posts
C# Tutorial
07/20/2024
How to Download Microsoft SQL Server
06/22/2024
What Are RESTful Web Services?
02/19/2024