我有一个使用SELECT...CASE语句根据用户输入创建对象的过程: hash = New MD5CryptoServiceProvider()VS分析器抱怨我没有在SELECT...CASE的每个实例中处理对象,所以如果用户提供"SHA1“作为算法类型,则哈希设置为一个新的SHA1Managed对象</em
public virtual string CreateHash(byte[] data, string hashAlgorithm = "SHA1") if (String.IsNullOrEmpty(hashAlgorithm))
var algorithm = HashAlgorithm.Create(hashAlgorithmalgorithm.ComputeHash
我需要处理的最后一部分将返回用户的User_Id GUID,当给定的用户名和密码散列与存储在我们的用户数据库中的SHA1 Base64Encoded密码散列匹配时。使用以下带有硬编码用户名和密码盐的VB.Net代码,我可以创建一个有效的密码散列。....., 0, src.Length) Dim algorithm As HashAlgorithm= HashAlgorithm.