Decrease probability of bad result for phoenix

This commit is contained in:
Slava Bacherikov committed 2018-01-27 02:44:54 +02:00
1 parent ef4e03dc40
commit a605c675e7
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -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);
+1 -1
View File
@@ -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;
}