title: SubtleCrypto.digest() fails for SHA-1 in Microsoft Edge
body: <p>I am trying to generate the SHA-1 hash of a string using the Web Crypto API. The code i am using to do this is pretty much the second example from the <a href="https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#Example" rel="nofollow noreferrer" title="MDN SubtleCrypto.digest() page">MDN 
  SubtleCrypto.digest() page</a>.</p>
  
  <pre><code>async function getHash(value, algorithm = 'SHA-1') {
    let msgBuffer = new TextEncoder('utf-8').encode(value);
    let hashBuffer = await crypto.subtle.digest(algorithm, msgBuffer);
    let hashArray = Array.from(new Uint8Array(hashBuffer));
    return hashArray.map(b =&gt; ('00' + b.toString(16)).slice(-2)).join('');
  }
  </code></pre>
  
  <p>See <a href="https://jsfiddle.net/tpxe6bv1/7/" rel="nofollow noreferrer">this JSFiddle</a> for a demo.</p>
  
  <p>I am also using <a href="https://github.com/inexorabletash/text-encoding" rel="nofollow noreferrer">this TextEncoder Polyfill</a> in Edge. It works fine in Firefox and Chrome, but in Microsoft Edge i just get the error message "SHA-1".</p>
  
  <p>I couldn't find anything about this error. Does someone know what is going wrong? Is there a better way to do this?</p>