Pages

Ads 468x60px

C# Code for Encrypt and Decrypt Password In Binary Format

Encrypt and Decrypt Data In Binary Format

public string EnryptString(string strEncrypted)

{

byte[] b = System.Text.ASCIIEncoding.ASCII.GetBytes(strEncrypted);

string encryptedPassword = Convert.ToBase64String(b);

return encryptedPassword;

}

public string Decrypter(string encrString)

{

byte[] b = Convert.FromBase64String(encrString);

string decryptedPassword = System.Text.ASCIIEncoding.ASCII.GetString(b);

return decryptedPassword;

No comments:

Post a Comment