如果我通过使用这样的东西创建盐:
public class User
{
private const int Hash_Salt_Length = 8;
private byte[] saltBytes = new byte[Hash_Salt_Length];
public User()
{
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
rng.GetNonZeroBytes(saltBytes);
}
....
}
Run Code Online (Sandbox Code Playgroud)
saltBytes每个会话的bytes数组都不同(重启应用程序).如何检查密码以允许用户登录我们的应用程序?