String hex = new String(org.apache.commons.codec.binary.Hex.encodeHex("test".getBytes()));
System.out.println(hex);
C#:
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
string hex = System.BitConverter.ToString(encoding.GetBytes("test")).Replace("-", string.Empty);
Console.WriteLine(hex);
No comments:
Post a Comment