title: Create htpasswd SHA1 password in powershell
body: <p>I want to create a htpasswd password, based on SHA1, in PowerShell.</p>
  
  <p>Using the word "test" as password I have tested various functions and always get the SHA1 value:</p>
  
  <pre><code>a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
  </code></pre>
  
  <p>Testing this in a htpasswd file</p>
  
  <pre><code>user:{SHA}a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
  </code></pre>
  
  <p>I am not able to login.</p>
  
  <p>Using an online htpasswd generator. For example <a href="https://www.askapache.com/online-tools/htpasswd-generator/" rel="nofollow noreferrer">https://www.askapache.com/online-tools/htpasswd-generator/</a> I get </p>
  
  <pre><code>user:{SHA}qUqP5cyxm6YcTAhz05Hph5gvu9M=
  </code></pre>
  
  <p>Which works just fine.</p>
  
  <p>At first I thought I need to do a base64 en/decoding, but that is not the case.</p>
  
  <p>Anybody an idea on how to get from "test" to "qUqP5cyxm6YcTAhz05Hph5gvu9M="?</p>