mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-28 14:17:17 +00:00
fe9921457c
* add "want" expectations * add build step with analyzer tests * add colon to yml * Merge refs/heads/master into fix-analyzer-test-expectations * Merge refs/heads/master into fix-analyzer-test-expectations * Merge refs/heads/master into fix-analyzer-test-expectations * Merge refs/heads/master into fix-analyzer-test-expectations * remove tests from CI * readme file * change header size
23 lines
1001 B
Go
23 lines
1001 B
Go
package testdata
|
|
|
|
import (
|
|
"math/rand"
|
|
mathRand "math/rand"
|
|
"time"
|
|
)
|
|
|
|
func UseRandNew() {
|
|
source := rand.NewSource(time.Now().UnixNano()) // want "crypto-secure RNGs are required, use CSPRNG or PRNG defined in github.com/prysmaticlabs/prysm/shared/rand"
|
|
randGenerator := mathRand.New(source) // want "crypto-secure RNGs are required, use CSPRNG or PRNG defined in github.com/prysmaticlabs/prysm/shared/rand"
|
|
start := uint64(randGenerator.Intn(32))
|
|
_ = start
|
|
|
|
source = rand.NewSource(time.Now().UnixNano()) // want "crypto-secure RNGs are required, use CSPRNG or PRNG defined in github.com/prysmaticlabs/prysm/shared/rand"
|
|
randGenerator = rand.New(source) // want "crypto-secure RNGs are required, use CSPRNG or PRNG defined in github.com/prysmaticlabs/prysm/shared/rand"
|
|
}
|
|
|
|
func UseWithoutSeed() {
|
|
assignedIndex := rand.Intn(128) // want "crypto-secure RNGs are required, use CSPRNG or PRNG defined in github.com/prysmaticlabs/prysm/shared/rand"
|
|
_ = assignedIndex
|
|
}
|