Hashed and Salt with CAPICOM ? SHA 512 using asp-classic

7331

New Member
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.Thanks\[code\] <% Dim sDigest,sPassword,sSalt sDigest=SHA256(sRndStr) sPassword = Request.Form("pass") sSalt = Request.Form("username") & "SomeThingThatisStatic1234567890" With CreateObject("CAPICOM.HashedData") .Algorithm = 6 '<--- 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 & sSalt 'Response.Write "Here is your hash: " & .Value '---> here i would then check this hash with the hash in the database'---> and if it's the same let the user login if not go to error: wrong info. End With %>\[/code\]
 
Back
Top