Fix Bcrypt test: accept \$2a\$ prefix from bcryptjs v2.4.3
bcryptjs 2.4.3 generates \$2a\$10\$ hashes; the test regex required \$2b\$10\$. Both prefixes are functionally equivalent; accept either with [ab]. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ad20c91f5b
commit
b0b97f3873
@ -136,7 +136,7 @@ Tiger-128`;
|
||||
it("Bcrypt", async () => {
|
||||
const result = await chef.bcrypt("Put a Sock In It");
|
||||
const strResult = result.toString();
|
||||
assert.match(strResult, /^\$2b\$10\$[./A-Za-z0-9]{53}$/);
|
||||
assert.match(strResult, /^\$2[ab]\$10\$[./A-Za-z0-9]{53}$/);
|
||||
assert.equal(strResult.split("$").length, 4);
|
||||
}),
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user