Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap all 'crypto/rand' rng in tests with 'math/rand' #1327

Merged
merged 3 commits into from
Jun 3, 2015

Conversation

rht
Copy link
Contributor

@rht rht commented Jun 3, 2015

@jbenet jbenet added the backlog label Jun 3, 2015
@rht
Copy link
Contributor Author

rht commented Jun 3, 2015

I wonder if NewTimeSeededRand should be renamed to explicitly show that it outputs bytes? Other than this, there are SeededRand and default math.rand for integers, and finally crypto/rand.

All math.rand should be replaced with SeededRand.

Should the list be: RandomBytes (NewTimeSeededRand), RandomIntegers (SeededRand), and crypto/rand?

@rht
Copy link
Contributor Author

rht commented Jun 3, 2015

(adding one more commit to see if the go test fails again)

@rht
Copy link
Contributor Author

rht commented Jun 3, 2015

Test is still not faster than expected standard deviation.

@jbenet
Copy link
Member

jbenet commented Jun 3, 2015

hm. i think it makes the most difference in any keygen things -- there may also be other hardware based differences (diffs between systems where the os is serious about entropy collection or not)

jbenet added a commit that referenced this pull request Jun 3, 2015
Swap all 'crypto/rand' rng in tests with 'math/rand'
@jbenet jbenet merged commit 0494a4d into ipfs:master Jun 3, 2015
@jbenet jbenet removed the backlog label Jun 3, 2015
@wking wking mentioned this pull request Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants