2.1.2 • Published 2 years ago
@sefinek/randombytes v2.1.2
@sefinek/randombytes
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
});