aboutsummaryrefslogtreecommitdiff
path: root/actions/protector.go
diff options
context:
space:
mode:
Diffstat (limited to 'actions/protector.go')
-rw-r--r--actions/protector.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/actions/protector.go b/actions/protector.go
index ffc3c43..bd87945 100644
--- a/actions/protector.go
+++ b/actions/protector.go
@@ -129,10 +129,7 @@ func CreateProtector(ctx *Context, name string, keyFn KeyFunc) (*Protector, erro
fallthrough
case metadata.SourceType_custom_passphrase:
// Our passphrase sources need costs and a random salt.
- if protector.data.Salt, err = crypto.NewRandomBuffer(metadata.SaltLen); err != nil {
- return nil, err
- }
-
+ protector.data.Salt = crypto.NewRandomSlice(metadata.SaltLen)
protector.data.Costs = ctx.Config.HashCosts
}