bcrypt 雜湊比对

Check a candidate password against a bcrypt hash without trimming spaces. Inputs above 72 UTF-8 bytes are rejected to prevent silent truncation.

輸入: 文本結果: 文本

文本輸入

執行後查看結果

範例

驗證 Apache 產生的 Bcrypt 密語

輸入

correct horse battery staple

Expected answer

Match

雜湊
$2y$04$61rxEDaR3PSKMDB/eWLl/urGkJ9Tv9DqmuoL2gfueVB.Ccqbw/JHq
辨識大小寫變化且不顯示密碼

輸入

Correct horse battery staple

Expected answer

No match

雜湊
$2y$04$61rxEDaR3PSKMDB/eWLl/urGkJ9Tv9DqmuoL2gfueVB.Ccqbw/JHq
辨識複製密碼時多出的末尾空格

輸入

correct horse battery staple 

Expected answer

No match

雜湊
$2y$04$61rxEDaR3PSKMDB/eWLl/urGkJ9Tv9DqmuoL2gfueVB.Ccqbw/JHq
接受剛好 72 個 ASCII 位元組

輸入

0123456789012345678901234567890123456789012345678901234567890123456789AB

Expected answer

Match

雜湊
$2y$04$SVHoaZ/YvW3oYrcmsXsZ9epfQq88AwEZG/Vw7.aYp6gRxrSoWFAnq
拒絕第 73 個位元組,避免僅比對前綴

輸入

0123456789012345678901234567890123456789012345678901234567890123456789ABC

Expected rejection

Message contains
Bcrypt accepts at most 72 UTF-8 bytes here; longer passwords are rejected to avoid silent truncation.
雜湊
$2y$04$SVHoaZ/YvW3oYrcmsXsZ9epfQq88AwEZG/Vw7.aYp6gRxrSoWFAnq
24 個漢字剛好占 72 個 UTF-8 位元組

輸入

茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶茶

Expected answer

Match

雜湊
$2y$04$obm1IVNBttgCKd9qusGWvOsXYXpnHe.aoyrZEEKXiJLsPhGTikrEu
拒絕不完整的 Bcrypt 雜湊

輸入

public-example

Expected rejection

Message contains
Invalid bcrypt hash: use a complete 60-character $2a$, $2b$ or $2y$ hash with cost 04–31.
雜湊
$2b$04$broken
dolphin

Reproduce this published regression case and compare the exact result. Bcrypt compare: dolphin.

輸入

dolphin

Expected answer

Match

雜湊
$2a$10$qyon0LQCmMxpFFjwWH6Qh.dDdhqntQh./IN0RXCc3XIMILuOYZKgK
invalid salt version

Reproduce this published regression case and compare the exact result. Bcrypt compare: invalid salt version.

輸入

password

Expected rejection

Message contains
Invalid bcrypt hash:
雜湊
$ab$04$K.H1WlFDQ/iIo/PiprT/puwluJ5rzuSE5q8D/Fk3NuLgU2aXiGR9m

相关工具

雜湊

操作参考

查看原始技术文檔 (English)