title: Make sure the value of Authorization header is formed correctly including the signature
body: <p>When using the Azure Storage API to access file services, we are getting the following errors.</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;Error&gt;
    &lt;Code&gt;AuthenticationFailed&lt;/Code&gt;
    &lt;Message&gt;Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:5a7f5ef2-a01a-0023-134e-436c77000000 Time:2021-05-07T14:36:32.7067133Z&lt;/Message&gt;
    &lt;AuthenticationErrorDetail&gt;Unversioned authenticated access is not allowed.&lt;/AuthenticationErrorDetail&gt;
  &lt;/Error&gt;
  </code></pre>
  <p>We've followed the documentation and believe we have all the correct headers but obviously missing something.</p>
  <p>Signature string we're encoding:</p>
  <pre><code>GET\n\n\n\n\n\n\n\n\n\n\n\nx-ms-date:Fri, 07 May 2021 15:29:49 GMT\nx-ms-version:2020-04-08\n/*our_azure_resource*\ncomp:metadata
  </code></pre>
  <p>Code using CryptoJS that we're using to do the encoding</p>
  <pre class="lang-js prettyprint-override"><code>let signature = CryptoJS.HmacSHA256(CryptoJS.enc.Utf8.parse(stringToSign).toString(), this.key)
                          .toString(CryptoJS.enc.Base64);
  </code></pre>
  <p>Value of Authorization header:</p>
  <pre><code>SharedKey storageaccountname:decodedstring
  </code></pre>