Encrypt and Decrypt Password Using C#

Encrypt and Decrypt Password Using C#

This article shows how to encrypt and decrypt your password using C#, let’s follow this tutorial below.

Step 1:

Design windows form application like this (see below image)

Encrypt and Decrypt Password Using C# - Form Design
Encrypt and Decrypt Password Using C# – Form Design

Step 2:

Add Eramake.eCryptography . To do this, right click project -> click Manage NuGet Package.. -> Browse Eramake.eCryptopgraphy and Install Eramake.eCryptography Package.(see below tutorial)

Encrypt and Decrypt Password Using C# - Step 2
Encrypt and Decrypt Password Using C# – Step 2

Step 3:

Source Code for Eramake.eCryptopgraphy(btnencrpyt_Click And btndecrpyt_Click) Events:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EncrpytAndDecrpot
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void btnencrpyt_Click(object sender, EventArgs e)
        {
            txt2.Text = Eramake.eCryptography.Encrypt(txt1.Text);
        }
        private void btndecrpyt_Click(object sender, EventArgs e)
        {
            txt4.Text = Eramake.eCryptography.Decrypt(txt3.Text);
        }
    }
}

Results:

Encrypt and Decrypt Password Using C# - Output
Encrypt and Decrypt Password Using C# – Output

Code Explanation:

This code explain, how to encrypt and decrypt your password to secure data from end user.

Encrypt and Decrypt Password Using C# Free Download Sourcode

Mark Jaylo

markjaylo26@gmail.com

YTC: https://www.youtube.com/c/MarkTheProgrammer

You may visit our facebook page for more information, inquiries and comments.

Hire our team to do the project.

, ,

Post navigation