密碼強度估算JavaScript庫:zxcvbn
zxcvbn是一個JavaScript密碼強度估算庫。用它來實現一個注冊表單的自定義密碼強度條。由dropbox 開發。它需要一個必需的參數,輸入密碼,然后返回一個結果對象。結果包括一些屬性:
result.entropy # bitsresult.crack_time # estimation of actual crack time, in seconds.
result.crack_time_display # same crack time, as a friendlier string:
# "instant", "6 minutes", "centuries", etc.
result.score # [0,1,2,3,4] if crack time is less than
# [10**2, 10**4, 10**6, 10**8, Infinity]. # (useful for implementing a strength bar.)
result.match_sequence # the list of patterns that zxcvbn based the
# entropy calculation on.
result.calculation_time # how long it took to calculate an answer,
# in milliseconds. usually only a few ms.</pre> <p><strong>項目主頁:</strong><a href="http://www.baiduhome.net/lib/view/home/1410852022570" rel="nofollow" target="_blank">http://www.baiduhome.net/lib/view/home/1410852022570</a></p>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!