Windows Forms: How to Encrypt and Decrypt a String in C#
By FoxLearn 6/2/2017 7:50:09 PM 7.13K
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
- Windows Forms: Text to speech in C#
- Windows Forms: Print Picture Box in C#
- Windows Forms: Advanced Filter DataGridView in C#
- Windows Forms: Progress Bar in C#
- How to create a Lucky Draw games in C#
- Windows Forms: Youtube Search with Paging in C#
- Windows Forms: How to Create a Random Password Generator in C#
- Windows Forms: Tag Control in C#
Categories
Popular Posts
Visual Studio: Auto increment version
04/01/2024
What is ARM architecture?
04/01/2024