DEP0115: crypto.prng(), crypto.pseudoRandomBytes(), crypto.rng()


类型: 仅文档(支持 --pending-deprecation

在 Node.js 的最新版本中,crypto.randomBytes()crypto.pseudoRandomBytes() 没有区别。

Type: Documentation-only (supports --pending-deprecation)

In recent versions of Node.js, there is no difference between crypto.randomBytes() and crypto.pseudoRandomBytes(). The latter is deprecated along with the undocumented aliases crypto.prng() and crypto.rng() in favor of crypto.randomBytes() and may be removed in a future release.