Implemented password hashing. Added and improved tests.

This commit is contained in:
Jonathan Bernard
2017-03-24 01:04:39 -05:00
parent b5a70f6de0
commit 52b7d2f48b
12 changed files with 113 additions and 56 deletions

View File

@ -25,6 +25,7 @@ when isMainModule:
Usage:
strawboss serve
strawboss run <project> <step> [options]
strawboss hashpwd <pwd>
Options
@ -40,7 +41,6 @@ Options
let args = docopt(doc, version = "strawboss v" & SB_VER)
echo $args
if args["run"]:
let req = RunRequest(
@ -62,3 +62,9 @@ Options
elif args["serve"]: server.start(cfg)
elif args["hashpwd"]:
echo $cfg.pwdCost
let pwd = server.hashPwd($args["<pwd>"], cfg.pwdCost)
echo pwd
echo pwd[0..28]