aboutsummaryrefslogtreecommitdiff
path: root/kdf.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-07-08 14:08:31 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-07-08 14:08:31 +0200
commit1a9115a96872af03f5fb97b0e6e6f84003b39fa4 (patch)
treeae2b59c9ed0d26cbf036d73212aad02541dd88b2 /kdf.go
parentc3c68525b2b2db444f962317077f16ce53e8770e (diff)
Go vet
Diffstat (limited to 'kdf.go')
-rw-r--r--kdf.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/kdf.go b/kdf.go
index 8926216..ad40a1b 100644
--- a/kdf.go
+++ b/kdf.go
@@ -6,7 +6,8 @@ import (
)
func Kdf(enc *key.Enc, ask func() (string, error)) error {
- if enc.KDFRounds == 0 {
+ if enc.KDFRounds == 0 || ask == nil {
+ enc.KDFRounds = 0
return nil
}
pass, err := ask()