Hi,
I'm hashing some data in Action Script then comparing the hash to one computed in C#, but they don't match.
Anyone know why?
Here's what I do in Action script:
var hash : String = MD5.hash(theString);
And here's what I do in C#:
var md5Hasher = MD5.Create();
byte[] data = md5Hasher.ComputeHash(Encoding.UTF8.GetBytes(theSameString));
var sBuilder = new StringBuilder();
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
var hash = sBuidler.ToString();
I'm thinking it's an encoding thing, but can't put my finger on it... let me know!
-Ev