Uh oh!
There was an error while loading. Please reload this page.
crypto: make pseudoRandomBytes an alias for randomBytes - #557
crypto: make pseudoRandomBytes an alias for randomBytes#557calvinmetcalf wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Maybe make this const int r = ....
bnoordhuis
commented
Jan 22, 2015
LGTM but I would like @indutny to sign off on it as well. |
4fdfcb2 to
a120e87Comparecalvinmetcalf
commented
Jan 22, 2015
ok moved the declaration down and made it a const, then split the line so it would pass linting, should an update to the docs be part of the same pull or a separate one? |
There was a problem hiding this comment.
Please don't hate me but it's > 80 columns now.
EDIT: Preempted!
bnoordhuis
commented
Jan 22, 2015
Please roll it into this one. |
indutny
commented
Jan 22, 2015
@bnoordhuis perhaps we should not block in case of pseudo random bytes? |
indutny
commented
Jan 22, 2015
Otherwise I suggest deprecating |
bnoordhuis
commented
Jan 22, 2015
I don't think this PR changes that. Or does it?
I agree but I would suggest doing that in a separate PR, provided we agree this PR is not a functional change. That way, we can land this PR now and land the deprecation PR in 1.1.0. |
calvinmetcalf
commented
Jan 22, 2015
@bnoordhuis this should not be a functional change @indutny maybe a the blocking/not blocking distinction can be rolled into the changes to the api around randomBytesSync. Will update the docs |
Previously pseudoRandomBytes worked similarly to randomBytes but in the event of insufficient entropy would silently return non-secure values. As of f68a116 the entropy pool blocks if there is insufficient entropy instead of giving an error so there is now no longer a case where pseudoRandomBytes would act differently then randomBytes. Docs are updated to remove pseudoRandomBytes and to clarify that randomBytes now does block instead of erring when entropy is low.
calvinmetcalf
commented
Jan 22, 2015
updated |
indutny
commented
Jan 22, 2015
LGTM, let's deprecate it soon. |
Previously pseudoRandomBytes worked similarly to randomBytes but in the event of insufficient entropy would silently return non-secure values. As of f68a116, the entropy pool blocks if there is insufficient entropy instead of giving an error so there is now no longer a case where pseudoRandomBytes would act differently than randomBytes. Docs are updated to remove pseudoRandomBytes and to clarify that randomBytes now does block instead of erring when entropy is low. PR-URL: #557 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor@indutny.com>
bnoordhuis
commented
Jan 22, 2015
Landed with some touch-ups in e5e5980. Thanks, Calvin! |
Previously pseudoRandomBytes worked similarly to randomBytes but in the event of
insufficient entropy would silently return non-secure values. As of f68a116
the entropy pool blocks if there is insufficient entropy instead of giving an
error so there is now no longer a case where pseudoRandomBytes would act
differently then randomBytes.
Inspired by discussions on #545