title: Hashing password into SQL
body: <p>I'm hashing a password in SQL directly like this :</p>
  
  <pre><code>DECLARE @HashThis nvarchar(4000);
  SET @HashThis = 'SecretPizza'
  
  INSERT into Users (UserId,Password)
  Values ('CryptTest',HASHBYTES('SHA1', @HashThis))
  </code></pre>
  
  <p>Result :</p>
  
  <p><img src="https://i.stack.imgur.com/m3Y0M.png" alt="enter image description here"></p>
  
  <p>When I try and change the <code>SHA1</code> Algorithm to <code>SHA2_256</code> or <code>SHA2_512</code> I get the following error : </p>
  
  <p><img src="https://i.stack.imgur.com/VnWIU.png" alt="enter image description here"></p>
  
  <p><strong>Question 1</strong> - Is this really supposed to give me chinese like characters ? <br>
  <strong>Question 2</strong> - Those are valid algorithm so how come I can't use them and why is encryption setting <code>@HashThis</code> to null? </p>