public static byte[] Decode(string input) { char[] data = input.ToCharArray(); Base64Decoder myDecoder = new Base64Decoder(data); byte[] temp = myDecoder.GetDecoded(); return temp; }
public static string DecodeString(string input) { char[] data = input.ToCharArray(); Base64Decoder myDecoder = new Base64Decoder(data); StringBuilder sb = new StringBuilder(); byte[] temp = myDecoder.GetDecoded(); sb.Append(System.Text.UTF8Encoding.UTF8.GetChars(temp)); return sb.ToString(); }