github.com/slackhq/nebula@v1.9.0/cert/crypto_test.go (about) 1 package cert 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 "golang.org/x/crypto/argon2" 8 ) 9 10 func TestNewArgon2Parameters(t *testing.T) { 11 p := NewArgon2Parameters(64*1024, 4, 3) 12 assert.EqualValues(t, &Argon2Parameters{ 13 version: argon2.Version, 14 Memory: 64 * 1024, 15 Parallelism: 4, 16 Iterations: 3, 17 }, p) 18 p = NewArgon2Parameters(2*1024*1024, 2, 1) 19 assert.EqualValues(t, &Argon2Parameters{ 20 version: argon2.Version, 21 Memory: 2 * 1024 * 1024, 22 Parallelism: 2, 23 Iterations: 1, 24 }, p) 25 }