Method for Data Encryption

  1. //you can use this method to encrypt required data and save into database in //encrypted form.    
  2.   
  3. private string MethodForEncryption(string PlaintText)    
  4. {    
  5.     string strMessage =string.Empty;    
  6.     byte[] Encode=new byte[PlaintText.Length];    
  7.     Encode=System.Text.Encoding.UTF8.GetBytes(PlaintText);    
  8.     strMessage=Convert.ToBase64String(Encode);    
  9.     return strMessage;    
  10. }