aboutsummaryrefslogtreecommitdiff
path: root/kdf.go
diff options
context:
space:
mode:
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()