htc b500366a42 首次提交 | hai 3 meses | |
---|---|---|
.. | ||
.travis.yml | hai 3 meses | |
.zuul.yml | hai 3 meses | |
LICENSE | hai 3 meses | |
README.md | hai 3 meses | |
browser.js | hai 3 meses | |
index.js | hai 3 meses | |
package.json | hai 3 meses | |
test.js | hai 3 meses |
randombytes from node that works in the browser. In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues
var randomBytes = require('randombytes');
randomBytes(16);//get 16 random bytes
randomBytes(16, function (err, resp) {
// resp is 16 random bytes
});