{"_id":"random-bytes","_rev":"7-7d0f4f360be4898ea9106a6114113057","name":"random-bytes","description":"URL and cookie safe UIDs","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"random-bytes","description":"URL and cookie safe UIDs","version":"1.0.0","contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"license":"MIT","repository":{"type":"git","url":"https://github.com/crypto-utils/random-bytes"},"devDependencies":{"bluebird":"3.1.1","istanbul":"0.4.2","mocha":"2.3.4","proxyquire":"1.2.0"},"files":["LICENSE","HISTORY.md","README.md","index.js"],"engines":{"node":">= 0.8"},"scripts":{"test":"mocha --trace-deprecation --reporter spec --bail --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/"},"keywords":["bytes","generator","random","safe"],"gitHead":"3dcd47425a3dfe858ee8debcd4db0c1222110bc3","bugs":{"url":"https://github.com/crypto-utils/random-bytes/issues"},"homepage":"https://github.com/crypto-utils/random-bytes","_id":"random-bytes@1.0.0","_shasum":"4f68a1dc0ae58bd3fb95848c30324db75d64360b","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"4f68a1dc0ae58bd3fb95848c30324db75d64360b","tarball":"https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz","integrity":"sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuTarR5J1PqSA8DFC833MPfI0QkpQTmV8INFpJWv07RgIhAJ8w0jhOh8lI5s1jByvL/RUqEaPUPrY3i8K3IoydbAYq"}]}}},"readme":"# random-bytes\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nGenerate strong pseudo-random bytes.\n\nThis module is a simple wrapper around the Node.js core `crypto.randomBytes` API,\nwith the following additions:\n\n * A `Promise` interface for environments with promises.\n * For Node.js versions that do not wait for the PRNG to be seeded, this module\n will wait a bit.\n\n## Installation\n\n```sh\n$ npm install random-bytes\n```\n\n## API\n\n```js\nvar randomBytes = require('random-bytes')\n```\n\n### randomBytes(size, callback)\n\nGenerates strong pseudo-random bytes. The `size` argument is a number indicating\nthe number of bytes to generate.\n\n```js\nrandomBytes(12, function (error, bytes) {\n if (error) throw error\n // do something with the bytes\n})\n```\n\n### randomBytes(size)\n\nGenerates strong pseudo-random bytes and return a `Promise`. The `size` argument is\na number indicating the number of bytes to generate.\n\n**Note**: To use promises in Node.js _prior to 0.12_, promises must be\n\"polyfilled\" using `global.Promise = require('bluebird')`.\n\n```js\nrandomBytes(18).then(function (string) {\n // do something with the string\n})\n```\n\n### randomBytes.sync(size)\n\nA synchronous version of above.\n\n```js\nvar bytes = randomBytes.sync(18)\n```\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/random-bytes.svg\n[npm-url]: https://npmjs.org/package/random-bytes\n[node-version-image]: https://img.shields.io/node/v/random-bytes.svg\n[node-version-url]: http://nodejs.org/download/\n[travis-image]: https://img.shields.io/travis/crypto-utils/random-bytes/master.svg\n[travis-url]: https://travis-ci.org/crypto-utils/random-bytes\n[coveralls-image]: https://img.shields.io/coveralls/crypto-utils/random-bytes/master.svg\n[coveralls-url]: https://coveralls.io/r/crypto-utils/random-bytes?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/random-bytes.svg\n[downloads-url]: https://npmjs.org/package/random-bytes\n","maintainers":[{"name":"dougwilson","email":"doug@somethingdoug.com"}],"time":{"modified":"2022-06-25T11:17:09.823Z","created":"2016-01-17T07:32:57.071Z","1.0.0":"2016-01-17T07:32:57.071Z"},"homepage":"https://github.com/crypto-utils/random-bytes","keywords":["bytes","generator","random","safe"],"repository":{"type":"git","url":"https://github.com/crypto-utils/random-bytes"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"bugs":{"url":"https://github.com/crypto-utils/random-bytes/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mojaray2k":true,"ahmed-dinar":true}}