randombytes (2.1.0)
Published 2026-02-24 14:03:50 +00:00 by atheaadmin
Installation
registry=npm install randombytes@2.1.0"randombytes": "2.1.0"About this package
randombytes
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
});
Dependencies
Dependencies
| ID | Version |
|---|---|
| safe-buffer | ^5.1.0 |
Development Dependencies
| ID | Version |
|---|---|
| phantomjs | ^1.9.9 |
| standard | ^10.0.2 |
| tap-spec | ^2.1.2 |
| tape | ^4.6.3 |
| zuul | ^3.7.2 |
Keywords
crypto
random