title: Hashed and Salt with CAPICOM ? SHA 512 using asp-classic
body: <p>I would like to know if this method is safe to use for login since this is the only one I found that is easy to understand and that it is in asp-classic so that I a noob can understand and add to the site I have.</p>
  
  <p>Thanks</p>
  
  <pre><code>    &lt;%
      Dim sDigest,sPassword,sSalt
      sDigest=SHA256(sRndStr)
  
  
      sPassword = Request.Form("pass")
      sSalt = Request.Form("username") &amp; "SomeThingThatisStatic1234567890"
  
      With CreateObject("CAPICOM.HashedData") 
        .Algorithm = 6 '&lt;--- This will use SHA-512
        'CAPICOM_HASH_ALGORITHM_SHA1      = 0 
        'CAPICOM_HASH_ALGORITHM_MD2       = 1 
        'CAPICOM_HASH_ALGORITHM_MD4       = 2 
        'CAPICOM_HASH_ALGORITHM_MD5       = 3 
        'CAPICOM_HASH_ALGORITHM_SHA_256   = 4 - Not supported on Windows XP or 2000 
        'CAPICOM_HASH_ALGORITHM_SHA_384   = 5 - Not supported on Windows XP or 2000 
        'CAPICOM_HASH_ALGORITHM_SHA_512   = 6 - Not supported on Windows XP or 2000 
  
        .Hash sPassword &amp; sSalt 
  
  'Response.Write "Here is your hash: " &amp; .Value 
  '---&gt; here i would then check this hash with the hash in the database
  '---&gt; and if it's the same let the user login if not go to error: wrong info.
      End With 
  %&gt;
  </code></pre>