lib,src: make pseudoRandomBytes alias randomBytes
authorCalvin Metcalf <cmetcalf@appgeo.com>
Thu, 22 Jan 2015 02:30:27 +0000 (21:30 -0500)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 22 Jan 2015 22:08:36 +0000 (23:08 +0100)
commite5e598060eb43faf2142184d523a04f0ca2d95c3
tree382563ae7c3657b2ee4dd3673e80023f77e270a2
parentc6cd46041c70794d89634da380555fb613c2e0ab
lib,src: make pseudoRandomBytes alias randomBytes

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: https://github.com/iojs/io.js/pull/557
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
doc/api/crypto.markdown
lib/crypto.js
src/node_crypto.cc