Skip to content

Commit

Permalink
Merge pull request #36 from wnelson03/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Networking committed Feb 11, 2024
2 parents 29ba296 + 9328fc8 commit 618424e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Console/KeyAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ private static string req(NameValueCollection post_data)

ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

sigCheck(Encoding.Default.GetString(raw_response), client.ResponseHeaders["signature"], post_data.Get(0));
sigCheck(Encoding.UTF8.GetString(raw_response), client.ResponseHeaders["signature"], post_data.Get(0));

return Encoding.Default.GetString(raw_response);
}
Expand Down Expand Up @@ -1072,8 +1072,8 @@ public static class encryption
{
public static string HashHMAC(string enckey, string resp)
{
byte[] key = Encoding.ASCII.GetBytes(enckey);
byte[] message = Encoding.ASCII.GetBytes(resp);
byte[] key = Encoding.UTF8.GetBytes(enckey);
byte[] message = Encoding.UTF8.GetBytes(resp);
var hash = new HMACSHA256(key);
return byte_arr_to_str(hash.ComputeHash(message));
}
Expand Down

0 comments on commit 618424e

Please sign in to comment.