randombytes-shim

0.0.3 • Public • Published

Tiny shim for crypto.randomBytes for nodejs & browsers.

    npm i randombytes-shim

Uses crypto / msCrypto implementations where available and falls back to using Math.random() in the worst case (e.g. IE11).

    > var randomBytes = require("randombytes-shim");
    > console.log(randomBytes(3));
    Uint8Array [ 216, 210, 71 ]

Or use it directly in your HTML:

    <script src="randombytes-shim.min.js"></script> 

Package Sidebar

Install

npm i randombytes-shim

Weekly Downloads

0

Version

0.0.3

License

none

Unpacked Size

3.24 kB

Total Files

6

Last publish

Collaborators

  • chr15m