DEP0115:crypto.prng(), crypto.pseudoRandomBytes(), crypto.rng()
类型:仅文档(支持 --pending-deprecation
)
¥Type: Documentation-only (supports --pending-deprecation
)
在最近的 Node.js 版本中,crypto.randomBytes()
和 crypto.pseudoRandomBytes()
之间没有区别。后者与未记录的别名 crypto.prng()
和 crypto.rng()
一起被弃用,取而代之的是 crypto.randomBytes()
,并且可能会在未来的版本中删除。
¥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.