且构网

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

您如何执行强密码?

更新时间:2023-02-04 09:53:34

我认为无法强制使用强密码,但是您可以做很多事情来尽可能地鼓励它们.

I don't think it's possible to enforce strong passwords, but there are lots of things you can do to encourage them as much as possible.

  • 给每个密码定级,并以分数或图形栏等形式向用户提供反馈.
  • 设置最低密码分数,以清除糟糕的密码
  • 具有被禁止或隐藏密码分数的常见单词列表
  • Rate each password and give the user feedback in the form of a score or a graphical bar, etc.
  • Set a minimum password score to weed out the awful ones
  • Have a list of common words that are either banned, or tank the password score

我要使用的一个优秀技巧是将密码的有效期限与密码得分挂钩.因此,更强大的密码不需要经常更改.如果您可以直接向用户提供有关所选密码的有效期限(并动态更新密码,以便他们可以看到添加字符如何影响日期)的反馈,那么这特别有效.

One excellent trick I like to use is to have the password's expiry date tied to the password score. So stronger passwords don't need to be changed so often. This works particularly well if you can give users direct feedback about how long the password they've chosen will live for (and dynamically update it so they can see how adding characters affects the date).