Here Mudassar Ahmed Khan has explained with an example, how to encrypt and store Username or Password in SQL Server Database Table and then fetch, decrypt and display it in Windows Forms (WinForms) Application using C# and VB.Net.
The Username or Password will be first encrypted using AES Symmetric key (Same key) algorithm and then will be stored in the database.
The Decryption will be done by fetching the encrypted Username or Password from Database and then decrypting it using the same key that was used for encryption.
↧