C# - String to BASE64 and vise versa

public String StringToBASE64(String message)
{
     String _strBASE64 = null;
     Byte[] _byteArray = System.Text.Encoding.UTF8.GetBytes(message);
     _strBASE64 = Convert.ToBase64String(_byteArray);

     return _strBASE64;
}

public String BASE64ToString(String message)
{
     String _strResult = null;
     Byte[] _byteArray = Convert.FromBase64String(message);
javascript:void(0)
     _strResult = System.Text.Encoding.UTF8.GetString(_byteArray);

     return _strResult;

}

Popular posts from this blog

SAP CPI - Loop Process Call with SuccessFactor (oData V2)

Setting IntelliJ IDEA to run Groovy Script

C# - BASE64 to Image