Skip to content

Commit ef67ec9

Browse files
committed
test: correct test params to match ones used in the compared value
1 parent e74b761 commit ef67ec9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mod_test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assert, assertEquals } from "https://deno.land/std@0.152.0/testing/asserts.ts ";
1+
import { assert, assertEquals } from "std/assert/mod.ts";
22
import { hash, verify } from "./mod.ts";
33

44
Deno.test("basic hashing - scrypt format", (): void => {
@@ -11,7 +11,11 @@ Deno.test("basic hashing - PHC format", (): void => {
1111
});
1212

1313
Deno.test("basic hashing raw", (): void => {
14-
const hashedPassword = hash("test-password", { salt: "test" }, "raw");
14+
const hashedPassword = hash(
15+
"test-password",
16+
{ salt: "test", logN: 14 }, // the expected hash was generated using the older default parameters, hence logN=14 instead of logN=17
17+
"raw",
18+
);
1519
assertEquals(
1620
hashedPassword,
1721
"zu8gd0RTeX6r0dbNzBv5ZzXOAQo0UnFUw49uRXrPwAlDocpJSA43WEgAcKNlsBhLyA+zVDluz/0GFa1ShAcr6g==",

0 commit comments

Comments
 (0)