https://github.com/browserify/randomfill
https://github.com/browserify/randomfill
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/browserify/randomfill
- Owner: browserify
- License: mit
- Created: 2017-10-18T12:18:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-21T09:51:15.000Z (about 1 year ago)
- Last Synced: 2025-03-31T14:06:09.473Z (11 months ago)
- Language: JavaScript
- Size: 30.3 KB
- Stars: 9
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
randomfill
===
[](https://www.npmjs.org/package/randomfill)
randomfill from node that works in the browser. In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues
```js
var randomFill = require('randomfill');
var buf
randomFill.randomFillSync(16);//get 16 random bytes
randomFill.randomFill(16, function (err, resp) {
// resp is 16 random bytes
});
```