Javascript Math.random() 在不同浏览器中使用的算法有多好?可以用它来生成盐和一次性密码吗?
How good are algorithms used in Javascript Math.random() in different browsers? Is it okay to use it for generating salts and one-time passwords?
一个 random 我可以使用多少位?
How many bits from one random I can use?
不;JavaScript 的 Math.random() 函数不是加密安全的随机数生成器.你最好使用 JavaScript Crypto Library 的 Fortuna 实现,它是一个强大的伪随机数生成器(查看 src/js/Clipperz/Crypto/PRNG.js)或 getRandomValues
Nope; JavaScript's Math.random() function is not a cryptographically-secure random number generator. You are better off using the JavaScript Crypto Library's Fortuna implementation which is a strong pseudo-random number generator (have a look at src/js/Clipperz/Crypto/PRNG.js), or the Web Crypto API for getRandomValues
这篇关于Math.random() 在密码学上是安全的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在javascript中保护随机数?Secure random numbers in javascript?(在javascript中保护随机数?)
使用过期令牌发出同时 API 请求时如何避免多个令How to avoid multiple token refresh requests when making simultaneous API requests with an expired token(使用过期令牌发出同时 API 请求时如何
JWT 未解码“JWT malformed";- 节点角度JWT not decoding quot;JWT malformedquot; - Node Angular(JWT 未解码“JWT malformed;- 节点角度)
如何使没有到期时间的 JWT 令牌无效How to invalidate a JWT token with no expiry time(如何使没有到期时间的 JWT 令牌无效)
img src 链接中的授权标头Authorization header in img src link(img src 链接中的授权标头)
如何在客户端(vue.js)实现自动刷新?How to implement auto refresh in client side(vue.js)?(如何在客户端(vue.js)实现自动刷新?)