Node.js/crypto:修订间差异
来自康健生活
| 第31行: | 第31行: | ||
Rk+bv0tknWvcz/s= | Rk+bv0tknWvcz/s= | ||
-----END PRIVATE KEY-----</pre> | -----END PRIVATE KEY-----</pre> | ||
== crypto.randomBytes == | |||
生成随机字符串。 | |||
{{leftrightflex|<syntaxhighlight lang="javascript"> | |||
const random = crypto.randomBytes(16).toString('hex');</syntaxhighlight>|{{consoleout|<pre> | |||
2ca6416b606072a1ad0c85319bec5d3a | |||
</pre>}}}} | |||
== crypto.createSign == | == crypto.createSign == | ||