aswi2020vldc-gitlab/templetes/node_modules/randomfill/README.md @ 9bb1e829
1 |
randomfill
|
---|---|
2 |
===
|
3 |
|
4 |
[![Version](http://img.shields.io/npm/v/randomfill.svg)](https://www.npmjs.org/package/randomfill) |
5 |
|
6 |
randomfill from node that works in the browser. In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues |
7 |
|
8 |
```js |
9 |
var randomFill = require('randomfill'); |
10 |
var buf |
11 |
randomFill.randomFillSync(16);//get 16 random bytes |
12 |
randomFill.randomFill(16, function (err, resp) { |
13 |
// resp is 16 random bytes
|
14 |
});
|
15 |
```
|