pass
pass/pass.go
Fix a bug with salt generation. Our salt generation had a logic bug that would bail out in the absence of an error and continue on in the presence of an error, which is exactly the opposite of the behaviour we want. Basically, typo.
1.1 --- a/pass.go Tue Nov 11 19:26:25 2014 -0500 1.2 +++ b/pass.go Wed Nov 19 00:18:52 2014 -0500 1.3 @@ -12,7 +12,7 @@ 1.4 func Create(h func() hash.Hash, iters int, passphrase []byte) (result, salt []byte, err error) { 1.5 salt = make([]byte, 32) 1.6 _, err = rand.Read(salt) 1.7 - if err == nil { 1.8 + if err != nil { 1.9 return []byte{}, []byte{}, err 1.10 } 1.11 result = Check(h, iters, passphrase, salt)