RevealTheme logo

密碼雜湊產生器(PBKDF2)

使用 PBKDF2-SHA256 在你的瀏覽器中產生安全的密碼雜湊。比 MD5 或簡單 SHA 更強,工作因子可調。

如何使用本工具

  1. 1

    Type or paste the password you want to hash.

  2. 2

    Optionally set a salt (leave it blank for a secure random one) and choose an iteration count.

  3. 3

    Click Hash. The salted PBKDF2-SHA256 digest is derived entirely in your browser.

什麼是密碼雜湊產生器(PBKDF2)?

Bcrypt 是一種流行的密碼雜湊演算法,但它需要伺服器端的函式庫。本工具使用 PBKDF2(Password-Based Key Derivation Function 2,以密碼為基礎的金鑰衍生函式 2)產生強度相當的雜湊,這是一種由 NIST 推薦、迭代次數可調的演算法。bcrypt 和 PBKDF2 都會刻意減慢暴力破解攻擊的速度;適當的迭代次數會使每次嘗試耗時約 250 毫秒。

常見使用場景

  • Learn how salted, iterated password hashing works by watching the output change with the salt and work factor.

  • Generate test hashes to seed a development database without wiring up your real auth code.

  • Produce a reference digest to confirm your server-side PBKDF2 implementation matches for the same inputs.

  • Demonstrate to a team why MD5/SHA-1 password storage is unsafe versus a deliberately slow KDF.

  • Create a one-off credential for a script or prototype where pulling in a full auth library is overkill.

  • Benchmark how iteration count affects hashing time on your hardware to pick a sensible work factor.

常見問題

這是真正的 bcrypt 嗎?
不是:這是 PBKDF2-SHA256,在安全保障上與之類似。若需要字面意義的 bcrypt 格式,請使用伺服器端工具(Node 的 bcrypt npm 套件或 PHP 的 password_hash())。
我應該使用多少次迭代?
對於 SHA-256,超過 10 萬次是 OWASP 目前的指導建議。迭代越多,對你和攻擊者來說都越慢。

相關工具