From 6de6b14a09b3695fe797e5fd59a04b3c3834641a Mon Sep 17 00:00:00 2001 From: Joseph Richey Date: Thu, 19 Oct 2017 11:34:07 -0700 Subject: 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. --- actions/protector.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'actions/protector.go') 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 } -- cgit v1.2.3