using System.Security.Cryptography;
public static void Main()
string prueba = "Esto es una prueba para comprobar que efectivamente";
Console.WriteLine(string.Format("{0}-{1}", prueba.Length, BitConverter.ToString(Encoding.ASCII.GetBytes(prueba)).Replace("-","")));
private static string StringToHex(string hexstring)
StringBuilder sb = new StringBuilder();
foreach (char t in hexstring)
sb.Append(Convert.ToInt32(t).ToString("x"));