Skip to content

Commit 9a88e46

Browse files
committed
feat: add password-hash command
1 parent 42df821 commit 9a88e46

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/commands/generate/password-hash/verify.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,14 @@ export default class extends Command {
7676
"blockSize": process.cli.options[ "block-size" ],
7777
"iterations": process.cli.options[ "iterations" ],
7878
} ),
79-
res = await passwordHash.verifyHash( process.cli.arguments.digest, process.cli.arguments.password );
79+
res = await passwordHash.verifyHash( process.cli.arguments.digest, process.cli.arguments.password, { "update": true } );
8080

8181
console.log( "Hash is valid:", res.ok );
82+
console.log( "Update is required:", res.data.updateRequired );
83+
84+
if ( res.data.phc ) {
85+
console.log( "Updated hash:", res.data.phc );
86+
}
8287

8388
return res;
8489
}

0 commit comments

Comments
 (0)