Tool Hub

Bcrypt 雜湊

產生並驗證 bcrypt 密碼雜湊 (瀏覽器安全的純 JS 實作)

產生 bcrypt 密碼雜湊,或驗證密碼與現有雜湊值是否相符。鹽的輪數越高,抵禦暴力破解的能力越強,但產生時間也越長 (每輪工作量倍增)。現代建議使用 10-12 輪。

要雜湊的任意字符串 — 不是真實密碼。

使用方法

  1. 選擇「生成哈希」模式,輸入測試字符串,並選擇 4 到 15 之間的 salt rounds 值。
  2. Click "Generate" and wait — higher rounds values take exponentially longer (rounds 12 ≈ 300ms)。
  3. 複製生成的哈希字符串以用於測試或文檔。
  4. Switch to "Verify hash" mode, enter the original string and the stored hash, and click "Verify" to confirm they match。
  5. All computation runs locally in your browser and nothing is stored or sent anywhere。

範例

  • 使用 10 rounds 對「hunter2」進行哈希運算會在約 100ms 內產生類似 $2b$10$... 的字符串;格式行確認版本 2b 和 10 rounds。
  • In verify mode, pasting that hash back and entering "hunter2" returns a match, while entering "hunter3" returns a mismatch。

生產環境使用前請驗證輸出。無擔保 — 參見 條款.