main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
575 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | randombytes
|
---|
| 2 | ===
|
---|
| 3 |
|
---|
| 4 | [](https://www.npmjs.org/package/randombytes) [](https://travis-ci.org/crypto-browserify/randombytes)
|
---|
| 5 |
|
---|
| 6 | randombytes 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 randomBytes = require('randombytes');
|
---|
| 10 | randomBytes(16);//get 16 random bytes
|
---|
| 11 | randomBytes(16, function (err, resp) {
|
---|
| 12 | // resp is 16 random bytes
|
---|
| 13 | });
|
---|
| 14 | ```
|
---|
Note:
See
TracBrowser
for help on using the repository browser.