Windows Forms: How to Encrypt and Decrypt a String in C#
By FoxLearn 6/2/2017 7:50:09 PM 7.29K
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 Add Combobox to DataGridView in C#
- How to Create Multiple pages on the Form using Panel control in C#
- How to insert Math Equation to RichTextBox in C#
- How to Send and Receive email in Microsoft Outlook using C#
- How to Print Windows Form in C#
- 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#
Categories
Popular Posts
How to implement Jint in C#
09/14/2024
How to Download Chromedriver for Selenium
09/14/2024