public static void Main()
string xDateHeader = "2022-10-17T11:49:00.00-06:00";
string httpMethod = "GET";
string contentTypeHeader = null;
string requestUriAbsolutePath = "/FuelFinder/Locations";
string hash = "qhb5/1oVrZUr3+3ZC3wvb//e0nU=";
System.DateTime xDate = System.Convert.ToDateTime(xDateHeader);
System.Text.UTF8Encoding utf8Encoding = new System.Text.UTF8Encoding();
System.Collections.Generic.IList<string> signatureComponents =
new System.Collections.Generic.List<string>();
signatureComponents.Add(httpMethod.ToUpperInvariant());
if (contentTypeHeader != null &&
!contentTypeHeader.ToUpperInvariant().Contains("multipart/form-data".ToUpperInvariant()))
signatureComponents.Add(contentTypeHeader);
signatureComponents.Add(requestUriAbsolutePath);
signatureComponents.Add(xDateHeader);
string stringToHash = string.Join("\n", signatureComponents);
byte[] stringToHashBytes = utf8Encoding.GetBytes(stringToHash);
System.Security.Cryptography.HMACSHA512 hmacsha512_hashedPassword =
new System.Security.Cryptography.HMACSHA512(utf8Encoding.GetBytes(hash));
byte[] computedBytes = hmacsha512_hashedPassword.ComputeHash(stringToHashBytes);
string computedBase64String = System.Convert.ToBase64String(computedBytes);
Console.WriteLine(WebUtility.UrlEncode(computedBase64String));