title: Validating Docusign HMAC Key using C#. Every time it is returning false
body: <pre><code>//This is how I am calling from controller
  var signature = Request.Headers[&quot;X-Docusign-Signature-1&quot;]; 
  var message = Request.Body; 
  StreamReader reader1 = new StreamReader(message); 
  string text = reader1.ReadToEnd();
  
  var isValid = docuSignHMACKeyValidation.HashIsValid(text, signature);
  
  // My Methods
  public string ComputeHash(string secret, string payload)
    {
    byte[] bytes = Encoding.UTF8.GetBytes(secret);
    HMAC hmac = new HMACSHA256(bytes);
    bytes = Encoding.UTF8.GetBytes(payload);
    return Convert.ToBase64String(hmac.ComputeHash(bytes));
    }
  
  public bool HashIsValid(string payload, string verify)
    {
    string secret = &quot;secretkey&quot;;
    ReadOnlySpan&lt;byte&gt; hashBytes = 
       Convert.FromBase64String(ComputeHash(secret, payload));
    ReadOnlySpan&lt;byte&gt; verifyBytes = Convert.FromBase64String(verify);
  
    return CryptographicOperations.FixedTimeEquals(hashBytes, verifyBytes);
    }
  </code></pre>