CSharp examples for System:String Base64
Encrypt String with base 64 encoder
using System.Web; using System.Text.RegularExpressions; using System.IO;/* www.ja v a 2 s .com*/ using System.Security.Cryptography; using System.Diagnostics; using System.Collections.Generic; using System; public class Main{ public static string EncryptString(string strEncrypted) { byte[] b = System.Text.ASCIIEncoding.ASCII.GetBytes(strEncrypted); string encryptedConnectionString = Convert.ToBase64String(b); return encryptedConnectionString; } }