Got a problem - maybe... It seems that this piece of PHP:
$mydigestb = hash("sha256",$digeststring);
does not generate the same result as this C# code:
private string GenerateDigest(long currentTime)
{
SHA256Managed hashString = new SHA256Managed();
StringBuilder hex = new StringBuilder();
byte[] hashValue = hashString.ComputeHash(Encoding.UTF8.GetBytes(String.Format("{0}{1}", currentTime, txtApiKey.Text)));
foreach (byte x in hashValue)
{
hex.AppendFormat("{0:x2}", x);
}
return hex.ToString();
}
The input values are the same, but it appears that what comes out is different.