'generates an 88 character hash string using a SHA1 derived algorithm Private Function GenerateHash(ByVal valueToHash As String, ByVal salt As String) As String Dim hasher As New System.Security.Cryptography.SHA512Managed Dim saltAsByte As Byte() = System.Text.Encoding.UTF8.GetBytes(salt) Dim valueToHashAsByte As Byte() = System.Text.Encoding.UTF8.GetBytes(valueToHash) Dim valueToHashPlusSaltAsByte(saltAsByte.Length + valueToHashAsByte.Length) As Byte saltAsByte.CopyTo(valueToHashPlusSaltAsByte, 0) valueToHashAsByte.CopyTo(valueToHashPlusSaltAsByte, saltAsByte.Length) Dim returnBytes As Byte() = hasher.ComputeHash(valueToHashPlusSaltAsByte) hasher.Clear() Return Convert.ToBase64String(returnBytes) End Function