@sefinek/randombytes

2.1.2 • Public • Published

@sefinek/randombytes

Version Build Status

Updated version of https://github.com/crypto-browserify/randombytes

Description

randombytes from node that works in the browser. In Node, you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues

const randomBytes = require('@sefinek/randombytes');
randomBytes(16); // Get 16 random bytes
randomBytes(16, function (err, resp) {
  // resp is 16 random bytes
});

Readme

Keywords

Package Sidebar

Install

npm i @sefinek/randombytes

Weekly Downloads

1

Version

2.1.2

License

MIT

Unpacked Size

6.2 kB

Total Files

7

Last publish

Collaborators

  • sefinek