Kenny , .NET SHA512Managed, , . zapped .
Function Hash(stringToHash, salt)
const SITE_WIDE_SALT = "THIS IS A SITE WIDE SALT, BUT COULD BE A GUID"
dim objUnicode : set objUnicode = CreateObject("System.Text.UnicodeEncoding")
dim objSHA512 : set objSHA512 = Server.CreateObject("System.Security.Cryptography.SHA512Managed")
dim saltedString : saltedString = SITE_WIDE_SALT & stringToHash & salt
dim arrByte : arrByte = objUnicode.GetBytes_4(saltedString)
dim strHash : strHash = objSHA512.ComputeHash_2((arrByte))
Hash = ToBase64String(strHash)
set objUnicode = nothing
set objSHA512 = nothing
End Function
' Helper method for function SHA512Hash
Function ToBase64String(rabyt)
'Ref: http://stackoverflow.com/questions/1118947/converting-binary-file-to-base64-string
dim xml : set xml = CreateObject("MSXML2.DOMDocument.3.0")
xml.loadXml "<Root></Root>"
xml.documentElement.dataType = "bin.base64"
xml.documentElement.nodeTypedValue = rabyt
ToBase64String = Replace(xml.documentElement.Text, vbLf, "")
set xml = nothing
End Function
, Hash .
dim hashedPassword
hashedPassword = Hash(password, "some random salt value")