Skip to content

Commit

Permalink
Merge pull request #1 from andrewabest/remove-redundant-serialization
Browse files Browse the repository at this point in the history
Removes an unneeded serialization step in SignatureCreator
  • Loading branch information
andrewabest authored Oct 23, 2018
2 parents 519d140 + d50d976 commit 322fd0f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Hmac/SignatureCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public string Create(
string scope,
string apiKey)
{
var serializedValue = JsonConvert.SerializeObject(content);
var encodedValue = Encoding.UTF8.GetBytes(serializedValue);
var encodedValue = Encoding.UTF8.GetBytes(content);
var sha256 = SHA256.Create();
var requestContentHash = sha256.ComputeHash(encodedValue);
var requestContentHashBase64String = Convert.ToBase64String(requestContentHash);
Expand Down

0 comments on commit 322fd0f

Please sign in to comment.