diff --git a/src/phoenix.spec.ts b/src/phoenix.spec.ts index d3cbc23..7f13337 100644 --- a/src/phoenix.spec.ts +++ b/src/phoenix.spec.ts @@ -13,7 +13,9 @@ describe("Test Phoenix BIOS", () => { it("find password for hash 12345", () => { function phoenixValidate(solver: bios.PhoenixSolver, hash: string): number { - return solver.calculateHash(solver(hash)[0]); + let newPassword = solver(hash)[0]; + expect(newPassword).not.toBeUndefined(); + return solver.calculateHash(newPassword); } expect(phoenixValidate(bios.phoenixSolver, "12345")).toEqual(12345); diff --git a/src/phoenix.ts b/src/phoenix.ts index ac58e31..f5de4d2 100644 --- a/src/phoenix.ts +++ b/src/phoenix.ts @@ -121,7 +121,7 @@ function bruteForce(hash: number, salt: number = 0, characters: string[] = lette let kk = 0; while (true) { kk++; - if (kk > 50000) { + if (kk > 7000000) { return PhoenixErrors.NotFound; }