aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-05-13 23:01:44 +0200
committerJakob Unterwurzacher2019-05-13 23:01:44 +0200
commit991adfc934d714897e3c0ad39d37fca3edf59bcb (patch)
tree6c63f27a46ea35d6244d3b5cd125e883bff05d5a /main.go
parent2cb0e8a1aeb42920f965956995d99cd2c8dbaa67 (diff)
-passwd now takes a passed -scryptn flag into account
https://github.com/rfjakob/gocryptfs/issues/400
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 40fd8ac..b96ebf0 100644
--- a/main.go
+++ b/main.go
@@ -94,7 +94,11 @@ func changePassword(args *argContainer) {
}
tlog.Info.Println("Please enter your new password.")
newPw := readpassword.Twice([]string(args.extpass), args.passfile)
- confFile.EncryptKey(masterkey, newPw, confFile.ScryptObject.LogN())
+ logN := confFile.ScryptObject.LogN()
+ if args._explicitScryptn {
+ logN = args.scryptn
+ }
+ confFile.EncryptKey(masterkey, newPw, logN)
for i := range newPw {
newPw[i] = 0
}