diff options
| author | Joseph Richey <joerichey94@gmail.com> | 2017-10-19 11:34:07 -0700 |
|---|---|---|
| committer | Joe Richey joerichey@google.com <joerichey@google.com> | 2017-10-20 11:24:14 -0700 |
| commit | 6de6b14a09b3695fe797e5fd59a04b3c3834641a (patch) | |
| tree | 49a6c617f0e470892099e0f38f4dd3ab9f920964 /actions | |
| parent | 3269bc539e52cdced8c03a628e4fdf22942ece4b (diff) | |
crypto: Remove crypto.randReader
As #19274 is now fixed in Go 1.9, there is no longer any reason to have
a duplicate implementation to the standard library. We can now move
safely to crypto/rand.
Diffstat (limited to 'actions')
| -rw-r--r-- | actions/protector.go | 5 |
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 } |