Skip to content

Commit

Permalink
Optimize hash methods
Browse files Browse the repository at this point in the history
  • Loading branch information
lschreck-mdsol committed Oct 5, 2018
1 parent 69dac85 commit 44be350
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Medidata.MAuth.Core/MAuthCoreExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public static TValue GetFirstValueOrDefault<TValue>(this HttpHeaders headers, st
/// <param name="value">The value for calculating the hash.</param>
/// <returns>The SHA512 hash of the input value as a hex-encoded byte array.</returns>
public static byte[] AsSHA512Hash(this string value) =>
Hex.Encode(SHA512.Create().ComputeHash(Encoding.UTF8.GetBytes(value)));
AsSHA512Hash(Encoding.UTF8.GetBytes(value));

public static byte[] AsSHA512Hash(this byte[] value) =>
Hex.Encode(SHA512.Create().ComputeHash(value));
Expand Down

0 comments on commit 44be350

Please sign in to comment.