Java:
String base64 = new String(org.apache.commons.codec.binary.Base64.encodeBase64("test".getBytes()));
System.out.println(base64);
C#:
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
string base64 = System.Convert.ToBase64String(encoding.GetBytes("test"));
Console.WriteLine(base64);
No comments:
Post a Comment