using .NET and C# i need to provide an integrity string using HMAC SHA512 to a PHP server . Using in C# :
Encoding encoding = Encoding.UTF8;
byte[] keyByte
private static string HashHmac(string message, string secret)
{
Encoding encoding = Encoding.UTF8;
using (HMACSHA512 hmac = new HMACSHA512(encoding.GetBytes(secret)))
{
var msg = encoding.GetBytes(message);
var hash = hmac.ComputeHash(msg);
return BitConverter.ToString(hash).ToLower().Replace("-", string.Empty);
}
}