@neumatter/random-bytes
v1.0.5
Published
Random Bytes function. Works in node and browser.
Downloads
12
Maintainers
Readme
randomBytes
Random Bytes function. Works in nodejs and browser.
Table of Contents
Install
npm i @neumatter/random-bytes
Usage
sync:
import randomBytes from '@neumatter/random-bytes'
const byteView = randomBytes(32)
// ...use byteView
callback:
import randomBytes from '@neumatter/random-bytes'
randomBytes(32, (err, byteView) => {
if (err) {
console.error(err)
} else {
// ...use byteView
}
})