{"_id":"@kdf/salt","_rev":"6-ea81441e2d76e35c288c952bb6be4955","time":{"1.0.0":"2018-07-12T20:41:06.374Z","created":"2018-07-12T21:01:32.311Z","1.0.1":"2018-07-12T21:01:32.773Z","modified":"2022-04-05T23:17:11.876Z","2.0.0":"2020-07-05T07:57:25.099Z","2.0.1":"2020-07-05T09:50:15.278Z"},"name":"@kdf/salt","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.1":{"name":"@kdf/salt","version":"1.0.1","description":"Crypto secure salt generator","license":"MIT","homepage":"https://github.com/simonepri/kdf-salt#readme","repository":{"type":"git","url":"git+https://github.com/simonepri/kdf-salt.git"},"bugs":{"url":"https://github.com/simonepri/kdf-salt/issues","email":"simonepri@outlook.com"},"author":{"name":"Simone Primarosa","email":"simonepri@outlook.com","url":"https://simoneprimarosa.com"},"contributors":[{"name":"Simone Primarosa","email":"simonepri@outlook.com","url":"https://simoneprimarosa.com"}],"keywords":["kdf","salt","crypt","passwords","hashing","password","crypto"],"main":"index.js","files":["index.js"],"engines":{"node":">=4"},"scripts":{"test":"xo &&nyc ava","release":"np","update":"npm-check -u"},"publishConfig":{"access":"public"},"devDependencies":{"ava":"*","np":"*","npm-check":"*","nyc":"*","xo":"*"},"ava":{"verbose":true},"nyc":{"reporter":["lcovonly","text"]},"xo":{"prettier":true,"space":true},"gitHead":"ba4a5f764d9d3e59a244f033cf6d0e6f5f46d0ba","_id":"@kdf/salt@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"simonepri","email":"simonepri@outlook.com"},"dist":{"integrity":"sha512-hLZjuL0+VwSdT0R7srD3GInKyEibEAnUDHI1IQ5QDa4PRof98vujxKWtvukOtv+0ZWeSOxmuFmo80QMTHyvgMQ==","shasum":"977787a409187ff2bfcadcac374e6430d1fbee48","tarball":"https://registry.npmjs.org/@kdf/salt/-/salt-1.0.1.tgz","fileCount":4,"unpackedSize":7672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbR8GsCRA9TVsSAnZWagAAonYP/j3A1ny80GZHSpDV93WB\nGpWQms925Q6SpicY/ZbJ+e/RbA2liQKTaqqC/ugcrZt90Lubd7NIEgNP80Jv\nuxCkn16dDaN0p4ai/QpawbpOZfsYwTytbMILxJ8STwnJOb/kRpEED20I6OCw\npsxwCSs326wteuC6JH0VIAnhhfjzSVK9ylZCLJcvgWGxo15uHHrPGaWkuwWb\nTnA4+cfIf0k/C52/bjlHsA/StGuHw+fskhjC7RPIbp+H2C2yPO+BJZWjk3cS\nb//NEoFamXDreNLH9pR852V/byU2/xJWrG+6BYWrPDWdCCRmXohgPWnN/E4d\nPtuJrdMxNnJlkAQiBh84m3jGuF04dHssCejJlPLkLXvQqzWebC1E4R98wQ/j\n9Dyc07bXuXmvyEhySbhQTwKLwCDKbsgHf/pQ1pZTcks+HjrNDSJrTHky6jMx\nJgXWHa7CHA5t4JkssQ7GrFSdafp99uR16p3mZpRWp/09P9Twzo6ZU12Wgu48\nLA1LX1P/wvXAM4p6sBJ+MBgkoFrS4G8wVsWukPyUESbIRDBpdNzKS1A8FOtr\nUA/WRYvZCVQTMUVZmAELM7taS0uMLLew2v8HCsAC7ju8m2xZ2/DFPb7hCtKs\nhO+wv8PLQKA2xPXcuS4OWaO2osGRMQ8iYhjUcQxLMqdgAh6bjDHoFtfUBGCC\nrWgi\r\n=9r/i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAfBld1xFWbOCnrW3zkhzIIMszhxmMwE9TscCq5856JkAiB0dHccjTdZBYrZRDrdJrGgfqnnjoDJKtS478IgJWrtLA=="}]},"maintainers":[{"name":"simonepri","email":"simonepri@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/salt_1.0.1_1531429292634_0.6760326418268585"},"_hasShrinkwrap":false},"2.0.0":{"name":"@kdf/salt","version":"2.0.0","description":"Crypto secure salt generator","license":"MIT","homepage":"https://github.com/simonepri/node-kdf/tree/master/packages/salt#readme","repository":{"type":"git","url":"git+https://github.com/simonepri/node-kdf.git","directory":"packages/salt"},"bugs":{"url":"https://github.com/simonepri/node-kdf/issues","email":"simonepri@outlook.com"},"author":{"name":"Simone Primarosa","email":"simonepri@outlook.com","url":"https://simoneprimarosa.com"},"contributors":[{"name":"Simone Primarosa","email":"simonepri@outlook.com","url":"https://simoneprimarosa.com"}],"keywords":["kdf","salt","crypt","passwords","hashing","password","crypto"],"main":"index.js","engines":{"node":">=10"},"scripts":{"lint":"xo","test":"nyc ava","update":"npx npm-check -u"},"devDependencies":{"ava":"^3.9.0","nyc":"^15.1.0","xo":"~0.27.2"},"ava":{"verbose":true},"nyc":{"reporter":["lcovonly","text"]},"xo":{"prettier":true,"space":true},"_id":"@kdf/salt@2.0.0","_nodeVersion":"10.21.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-c4nyeu2BSkiUjH3uEh0CqWN/keaYy4H8yl7DxN1tqyDsmIdL4pi5elWMkN8pZnJy6xtMY1m4DZ+Z1JNqL23cNA==","shasum":"63e4a0a4914dd3689caa33f15156962fa24fbd3b","tarball":"https://registry.npmjs.org/@kdf/salt/-/salt-2.0.0.tgz","fileCount":4,"unpackedSize":8474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAYflCRA9TVsSAnZWagAA36gP/37+PIrl3LlxXK3yg+2V\nNm3tTNRl4iPRJ3LxOyCqPbGoannY5gkT19pUI++UhrjtNBCA4+BZCb1pYu+s\nkCeqtsiXURabv/g1hClPKTJqHWMnLe9iMLT3TukeEY9IVZhZVqaSRQ/15BYl\nUYPss51Wbj7SIfealF1j/tm/bmgksrzFudl2kIgEeJqrYTXknbch0CaQT0K1\nH/0sRsgiYrr4LSxVtT9sQuucZwubE/nML40Voyn5r9KpvZTrY+Dc8LUBpgDc\nL+etuoB2Kjv5iniE+pq4s07WOiVz9aSLVoRk4CYQUFX1H/sRwqGKQOyOC3Cq\nbILrC3/se2tfqWmlCXDJD6FfaIaUQ2p1MqXagO3HiDx7K+wTRVg5gBg1tuDQ\nLiuy5BPf/yDn0Fb3VcUSi08PcwTGOZlltYRDSmpI31gSXUhX4a0VYJCBIY1J\nYFmMs4Tg2PBnB/rFCE2PyCkT2aCKLHYR4rFrbr5DFKLRHbwe4bA7q+Cwmzwi\nxWEwQ7hTAcjJuYPa2FsXIWeieAS+70aCwyTUIbWgpJEpYbsoEDDjZugcGLJN\nVX2j0lyizjwnFf+7IOkNzYGWCH7MUxdxaWqGFkP27jD0FLN1fSpFB7efa3Vh\nawR9WjlauWS2W0eNWxjc6pC0NeiNG98OCUP2jXJejpcLnNmXcpYyF/gZD6N8\nUPLy\r\n=sAE0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZg4EZAt3fmw9JyHUeNTeydtDeoGRc/5RtBag+KNL0HAiAB+NcqJkKs3KtAYycRl2JKlIcPsQZ5gdnOFm4Q22LrUA=="}]},"maintainers":[{"name":"simonepri","email":"simonepri@outlook.com"}],"_npmUser":{"name":"simonepri","email":"simonepri@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/salt_2.0.0_1593935844996_0.5189367369294657"},"_hasShrinkwrap":false},"2.0.1":{"name":"@kdf/salt","version":"2.0.1","description":"Crypto secure salt generator","license":"MIT","homepage":"https://github.com/simonepri/node-kdf/tree/master/packages/salt#readme","repository":{"type":"git","url":"git+https://github.com/simonepri/node-kdf.git","directory":"packages/salt"},"bugs":{"url":"https://github.com/simonepri/node-kdf/issues","email":"simonepri@outlook.com"},"author":{"name":"Simone Primarosa","email":"simonepri@outlook.com","url":"https://simoneprimarosa.com"},"contributors":[{"name":"Simone Primarosa","email":"simonepri@outlook.com","url":"https://simoneprimarosa.com"}],"keywords":["kdf","salt","crypt","passwords","hashing","password","crypto"],"main":"index.js","engines":{"node":">=10"},"scripts":{"lint":"xo","test":"nyc ava","update":"npx npm-check -u"},"devDependencies":{"ava":"^3.9.0","nyc":"^15.1.0","xo":"~0.27.2"},"ava":{"verbose":true},"nyc":{"reporter":["lcovonly","text"]},"xo":{"prettier":true,"space":true},"_id":"@kdf/salt@2.0.1","_nodeVersion":"10.21.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-1RBY7HcGYuWBm0+4ygjdRerN+mhpuT5picGB6+azqUXsz/IZljegrKkeHRiV6wuxY8n4HrxOuw8ou7JuGxRWdQ==","shasum":"2d355a764524fa85217609addc376084b71de385","tarball":"https://registry.npmjs.org/@kdf/salt/-/salt-2.0.1.tgz","fileCount":4,"unpackedSize":8645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAaJXCRA9TVsSAnZWagAAf/kP/jruMy99HykZC4qQqWW/\nx3t+wZxcGZl81syjxmRjlA/bFt7qLzK9N/A8s6XGyeiX0QCOXwLopVrBdqIK\n2D6M7BNgwLV5sQf/uwxWpacFpjKSU2T5idXhp1xaltFz5W9hT3spW5lqtV9M\nnFWNOQprvjY1Q7n1S4U/skOiK5Rb7DiJYcnfFUTPw1Uph6hbFDIowTHhnqOT\naGZvwco/UrCD6B3ydeWWtNbGtbvC38nN1malNZb2oyqy6xNrxu43xxibFd1r\nZFpDSv7gD1z00gC1JPbqoFQX8Af+jmLiocZMudkxTlR26Xs8eV/oWOhTwDY4\n9X3tlBwI6boNJvBpLUuXZz57censrzD59VMMp/qstPQ4G4evTIR0WFTWqsEm\nLp0oJ7BJYTrqjT6wOxdMSlzg3H5VjkHMhhiQ7uXcE9HLIjJqrj0hWTAv6dsV\noS8X0MblcVfb8ylgVMPx4ls+slDU95Ye3XT55Z5hsek9akPiNywAo+2YjCca\n6VVduDHmn1fA0oNJhIEDqXYXH+job6s/C/kvAs2CoLppnI5dLSoeig70XNz3\nlUqIM1Vfy+kK5rsFG905yQqCvldRlUKFrDsPvcKGJS2iyRXjZH7z9I8y5JJd\nLTUfWkDxExj2eAwpYrtCmoOABNBPOqKTgwGr+0J6IgW2puPaoIQSrQdQdy9K\nIHDd\r\n=Aj7s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBe78vjr55fCbotvb5+LlAsKGFQw5RiCbgVdQHhH2sUAiEAg/CptMrUElO15Ec29RcSyBAWaH4advt2i72Mg2Sekvo="}]},"maintainers":[{"name":"simonepri","email":"simonepri@outlook.com"}],"_npmUser":{"name":"simonepri","email":"simonepri@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/salt_2.0.1_1593942615049_0.9906663701789264"},"_hasShrinkwrap":false}},"maintainers":[{"name":"simonepri","email":"simonepri@outlook.com"}],"description":"Crypto secure salt generator","homepage":"https://github.com/simonepri/node-kdf/tree/master/packages/salt#readme","keywords":["kdf","salt","crypt","passwords","hashing","password","crypto"],"repository":{"type":"git","url":"git+https://github.com/simonepri/node-kdf.git","directory":"packages/salt"},"contributors":[{"name":"Simone Primarosa","email":"simonepri@outlook.com","url":"https://simoneprimarosa.com"}],"author":{"name":"Simone Primarosa","email":"simonepri@outlook.com","url":"https://simoneprimarosa.com"},"bugs":{"url":"https://github.com/simonepri/node-kdf/issues","email":"simonepri@outlook.com"},"license":"MIT","readme":"<h1 align=\"center\">\n  <b>kdf-salt</b>\n</h1>\n<p align=\"center\">\n  <!-- Version - npm -->\n  <a href=\"https://www.npmjs.com/package/@kdf/salt\">\n    <img src=\"https://img.shields.io/npm/v/@kdf/salt.svg\" alt=\"Latest version on npm\" />\n  </a>\n  <!-- Downloads - npm -->\n  <a href=\"https://npm-stat.com/charts.html?package=@kdf/salt\">\n    <img src=\"https://img.shields.io/npm/dt/@kdf/salt.svg\" alt=\"Downloads on npm\" />\n  </a>\n  <!-- License - MIT -->\n  <a href=\"https://github.com/simonepri/node-kdf/blob/master/packages/salt/license\">\n    <img src=\"https://img.shields.io/github/license/simonepri/node-kdf.svg\" alt=\"Project license\" />\n  </a>\n\n  <br/>\n\n  <!-- Lint -->\n  <a href=\"https://github.com/simonepri/node-kdf/actions?query=workflow:salt-lint+branch:master\">\n    <img src=\"https://github.com/simonepri/node-kdf/workflows/salt-lint/badge.svg?branch=master\" alt=\"Lint status\" />\n  </a>\n  <!-- Test - macOS -->\n  <a href=\"https://github.com/simonepri/node-kdf/actions?query=workflow:salt-test-macos+branch:master\">\n    <img src=\"https://github.com/simonepri/node-kdf/workflows/salt-test-macos/badge.svg?branch=master\" alt=\"Test macOS status\" />\n  </a>\n  <!-- Test - Ubuntu -->\n  <a href=\"https://github.com/simonepri/node-kdf/actions?query=workflow:salt-test-ubuntu+branch:master\">\n    <img src=\"https://github.com/simonepri/node-kdf/workflows/salt-test-ubuntu/badge.svg?branch=master\" alt=\"Test Ubuntu status\" />\n  </a>\n  <!-- Test - Windows -->\n  <a href=\"https://github.com/simonepri/node-kdf/actions?query=workflow:salt-test-windows+branch:master\">\n    <img src=\"https://github.com/simonepri/node-kdf/workflows/salt-test-windows/badge.svg?branch=master\" alt=\"Test Windows status\" />\n  </a>\n\n  <br/>\n\n  <!-- Coverage - Codecov -->\n  <a href=\"https://codecov.io/gh/simonepri/node-kdf/tree/master/packages/salt\">\n    <img src=\"https://codecov.io/gh/simonepri/node-kdf/branch/master/graph/badge.svg?flag=salt\" alt=\"Codecov Coverage report\" />\n  </a>\n  <!-- DM - Snyk -->\n  <a href=\"https://snyk.io/test/github/simonepri/node-kdf?targetFile=packages/salt/package.json\">\n    <img src=\"https://snyk.io/test/github/simonepri/node-kdf/badge.svg?targetFile=packages/salt/package.json\" alt=\"Known Vulnerabilities\" />\n  </a>\n  <!-- DM - David -->\n  <a href=\"https://david-dm.org/simonepri/node-kdf?path=packages/salt\">\n    <img src=\"https://david-dm.org/simonepri/node-kdf/status.svg?path=packages/salt\" alt=\"Dependency Status\" />\n  </a>\n\n  <br/>\n\n  <!-- Code Style - XO-Prettier -->\n  <a href=\"https://github.com/xojs/xo\">\n    <img src=\"https://img.shields.io/badge/code_style-XO+Prettier-5ed9c7.svg\" alt=\"XO Code Style used\" />\n  </a>\n  <!-- Test Runner - AVA -->\n  <a href=\"https://github.com/avajs/ava\">\n    <img src=\"https://img.shields.io/badge/test_runner-AVA-fb3170.svg\" alt=\"AVA Test Runner used\" />\n  </a>\n  <!-- Test Coverage - Istanbul -->\n  <a href=\"https://github.com/istanbuljs/nyc\">\n    <img src=\"https://img.shields.io/badge/test_coverage-NYC-fec606.svg\" alt=\"Istanbul Test Coverage used\" />\n  </a>\n  <!-- Init - ni -->\n  <a href=\"https://github.com/simonepri/ni\">\n    <img src=\"https://img.shields.io/badge/initialized_with-ni-e74c3c.svg\" alt=\"NI Scaffolding System used\" />\n  </a>\n  <!-- Release - np -->\n  <a href=\"https://github.com/sindresorhus/np\">\n    <img src=\"https://img.shields.io/badge/released_with-np-6c8784.svg\" alt=\"NP Release System used\" />\n  </a>\n</p>\n<p align=\"center\">\n  🎲 Crypto secure salt generator\n\n  <br/>\n\n  <sub>\n    Coded with ❤️ by <a href=\"#authors\">Simone Primarosa</a>.\n  </sub>\n</p>\n\n## Install\n\n```bash\nnpm install --save @kdf/salt\n```\n\n## Usage\n\n```js\nconst gensalt = require('@kdf/salt');\n\ngensalt(16).then(salt => {\n  console.log(salt);\n  // => <Buffer 70 2c 6e 1c c1 07 2e 26 dc 82 52 4e 1b cf 1d 23>\n  console.log(salt.toString('base64'));\n  // => cCxuHMEHLibcglJOG88dIw==\n  console.log(salt.toString('hex'));\n  // => 702c6e1cc1072e26dc82524e1bcf1d23\n})\n```\n\n## API\n\n<a name=\"gensalt\"></a>\n\n### gensalt(length) ⇒ <code>Promise.&lt;Buffer&gt;</code>\nGenerates a cryptographically secure random string to be used as a password salt\n, using Node's built-in crypto.randomBytes() function.\n\n**Kind**: global function  \n**Returns**: <code>Promise.&lt;Buffer&gt;</code> - The salt as a Buffer.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| length | <code>number</code> | The length of the salt to be generated. Must be an integer within the range (`0` <= `length` <= `2^31-1`). |\n\n## Contributing\nContributions are REALLY welcome and if you find a security flaw in this code, PLEASE [report it][new issue].\n\n## Authors\n- **Simone Primarosa** - *Github* ([@simonepri][github:simonepri]) • *Twitter* ([@simoneprimarosa][twitter:simoneprimarosa])\n\nSee also the list of [contributors][contributors] who participated in this project.\n\n## License\nThis project is licensed under the MIT License - see the [license][license] file for details.\n\n\n<!-- Links -->\n[new issue]: https://github.com/simonepri/node-kdf/issues/new\n[contributors]: https://github.com/simonepri/node-kdf/contributors\n\n[license]: https://github.com/simonepri/node-kdf/blob/master/packages/salt/license\n\n[github:simonepri]: https://github.com/simonepri\n[twitter:simoneprimarosa]: http://twitter.com/intent/user?screen_name=simoneprimarosa\n","readmeFilename":"readme.md"}