Closed TeigeJDavidson closed 10 years ago
re: CalculateMac() method please look at the normalized string. i believe this is a more consistent formatting of it
//old lines in question //((!string.IsNullOrEmpty(ext)) ? ext : "") + "\n"; // compared to java - escaped newline //((!string.IsNullOrEmpty(payloadHash)) ? payloadHash + "\n" : "") + //compared to java version - add \n always after
//proposed string for normalized var
var normalized = "hawk.1." + type + "\n" + ts + "\n" + nonce + "\n" + method.ToUpper() + "\n" + uri.PathAndQuery + "\n" + host.ToLower() + "\n" + uri.Port.ToString() + "\n" + ((!string.IsNullOrEmpty(payloadHash)) ? payloadHash : "") + "\n" + ((!string.IsNullOrEmpty(ext)) ? ext.Replace("\\", "\\\\").Replace("\n", "\\n") : "") + "\n";
re: CalculateMac() method please look at the normalized string. i believe this is a more consistent formatting of it
//old lines in question //((!string.IsNullOrEmpty(ext)) ? ext : "") + "\n"; // compared to java - escaped newline //((!string.IsNullOrEmpty(payloadHash)) ? payloadHash + "\n" : "") + //compared to java version - add \n always after
//proposed string for normalized var