Working with hmacsha256 in windows store app
I'm migrating/converting/rebuilding a Windows Phone 7.1 app to a Windows 8 Store App. One method I am using in de WP7 app is giving me trouble: private byte[] GetSHA256Key(string data, string secretKey) { byte[] value = Encoding.UTF8.GetBytes(data); byte[] secretKeyBytes = Encoding.UTF8.GetBytes(secretKey); HMACSHA256 hmacsha256 = new HMACSHA256(secretKeyBytes); byte[] resultBytes = hmacsha256.ComputeHash(value); return resultBytes; } Looking at the documentation for Windows Store Apps I came up with this new code which I hoped would give the same result. But, no. I'm doing something wrong.