Authenticaion, hash, salt, https process?

本文关键字:process https salt hash Authenticaion | 更新日期: 2023-09-27 18:31:57

嗨,我想我可能以错误的方式完成了此操作,任何人都可以帮助解释您如何对密码进行哈希/加盐。您是从客户端还是从 Web 服务执行此操作?

有一个具有密码数据成员的数据合约,在我的服务中,我这样做是为了在保存密码之前创建密码的哈希/盐:

  So here is the process in which I was thinking.
Rest Service has https for secure connection
User creates account (along with password)
//to stop packet sniffing when user creates account https is used during POST so no one can see the password? 
web service then creates a hash of the password to store it
//so if anyone did get access to the service/database they couldnt make much use of the data in terms of breaching accounts
Then some means to authenticate that user there after

这是对的吗?

Authenticaion, hash, salt, https process?

听起来你走在正确的轨道上。哈希和盐值不应该发生在客户端,因为攻击者将可以访问该代码。https确实可以保护连接,不允许其他人读取数据。

在身份验证期间,您执行相同的操作:获取用户通过https输入的密码,对该值进行哈希/盐处理,然后将结果哈希与数据库中的值进行比较。当然,如果您曾经将Student对象返回给客户端,则它应该不包含任何值。

明智的做法是不要重用StudentPassword 属性,因为现在您无法判断它是否包含纯密码或哈希值。