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


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

在 Node.js 的最新版本中,crypto.randomBytes()crypto.pseudoRandomBytes() 没有区别。 后者与未记录的别名 crypto.prng()crypto.rng() 一起被弃用,取而代之的是 crypto.randomBytes(),并且可能在未来的版本中被删除。

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 might be removed in a future release.