diff options
author | Jakob Unterwurzacher | 2019-05-13 23:01:44 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2019-05-13 23:01:44 +0200 |
commit | 991adfc934d714897e3c0ad39d37fca3edf59bcb (patch) | |
tree | 6c63f27a46ea35d6244d3b5cd125e883bff05d5a /main.go | |
parent | 2cb0e8a1aeb42920f965956995d99cd2c8dbaa67 (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.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 } |