且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

加密在SQL Server 2008中的密码列

更新时间:2023-02-03 13:07:21

通常的做法是存储密码的哈希值。这样的:

The usual practice is to store a hash of the password. Like:

HASHBYTES('SHA1', convert(varbinary(32), @password))

通过哈希,你可以验证,如果密码匹配,但你不知道密码本身。因此,即使黑客获得了对数据库的完全访问权限,他仍然不知道密码。

With a hash, you can verify if the password matches, but you don't know the password itself. So even if a hacker gains complete access to your database, he still does not know the passwords.

有很多教程在网络上