This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string ToBase64(string encode) { | |
Byte[] btByteArray = null; | |
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding(); | |
btByteArray = encoding.GetBytes(encode); | |
string sResult = System.Convert.ToBase64String(btByteArray, 0, btByteArray.Length); | |
sResult = sResult.Replace("+", "-").Replace("/", "_"); | |
return sResult; | |
} | |
public static string FromBase64(string decode) { |
NewerOlder