{"_id":"bcryptjs-react","_rev":"1-6a893ab6be715d4cd3a69b2037d7b0c5","name":"bcryptjs-react","dist-tags":{"latest":"2.4.6"},"versions":{"2.4.5":{"name":"bcryptjs-react","description":"Webpack v5 - Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.","version":"2.4.5","author":{"name":"Daniel Wirtz","email":"dcode@dcode.io"},"contributors":[{"name":"Shane Girish","email":"shaneGirish@gmail.com","url":"https://github.com/shaneGirish"},{"name":"Alex Murray","url":"https://github.com/alexmurray"},{"name":"Nicolas Pelletier","url":"https://github.com/NicolasPelletier"},{"name":"Josh Rogers","url":"https://github.com/geekymole"},{"name":"Noah Isaacson","email":"noah@nisaacson.com","url":"https://github.com/nisaacson"}],"repository":{"type":"url","url":"git+https://github.com/jayanta525/bcrypt.js-react.git"},"bugs":{"url":"https://github.com/jayanta525/bcrypt.js-react/issues"},"keywords":["bcrypt","password","auth","authentication","encryption","crypt","webpack","react","crypto"],"bin":{"bcrypt":"bin/bcrypt"},"main":"index.js","browser":"dist/bcrypt.js","dependencies":{},"devDependencies":{"bcrypt":"latest","google-closure-compiler":">=20200719","metascript":"~1.0.0","testjs":"~1"},"license":"MIT","scripts":{"test":"node node_modules/testjs/bin/testjs","build":"node scripts/build.js","compile":"node node_modules/google-closure-compiler/cli.js dist/bcrypt.js --compilation_level=SIMPLE_OPTIMIZATIONS --create_source_map=dist/bcrypt.min.map > dist/bcrypt.min.js","compress":"gzip -c -9 dist/bcrypt.min.js > dist/bcrypt.min.js.gz","make":"npm run build && npm run compile && npm run compress && npm test"},"types":"./index.d.ts","gitHead":"281ab65a89b1499d79f6f33d3da931390ad86036","homepage":"https://github.com/jayanta525/bcrypt.js-react#readme","_id":"bcryptjs-react@2.4.5","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-e6cbQeekayQ1HZWqp0ccQBovvRHcvRNsmOfbOBojJriJg3D/UJvGwtpBEf4BzRiBlMZNnkuUAIJ7zayDj0CM8w==","shasum":"3517e0e6f13a0928d7870ecbc680cb5b8881aabd","tarball":"https://registry.npmjs.org/bcryptjs-react/-/bcryptjs-react-2.4.5.tgz","fileCount":29,"unpackedSize":224010,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwpfLfZt6uGT6O+i/nZH4CsAy1NJjSwBX3O3YMEc3x3AIhAMaEsj3BIOgh7qeT/EyAZj9EFSjSM9cE6+zv1//M6wY1"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7BBxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlNhAAkZJ6QAQIHpgVWOdWtKM8m6n37tTY9m1jzB+aFvkPzkqQlJ72\r\n8wsNIxtoRR8UoZ1NmPet2vEgzPOGFdJLU6HQMJe0NXGiDB6rUFOFLEI5DXGR\r\ncvCijixhROfX2RARB/yqmLW9GjvGoM1GMoFjF6IMaIzR3aSM8lCxh+FdM9HG\r\n07uWpD4QHUeIqcLqTeCqXu1HMlUeKAxZKCM54Dp9KYXd/LPv2GcQ42JbKgww\r\nFPuZ6T+4H1HcUoMXwV1aaAhC0N3Y+S4BSMfbgth72efBR2TyVOdgfh9wLAba\r\nRxwTobKIz1K6EEqHTYvaV4Rwz8pNUywxmRIcKtDnHG0xtcC+V5EP96c1jYfO\r\n9pLSXOv+kWz8p/rGe4T7XnXLkPI8lieLAUbwt9PEyS57bdvCnNVLxuYGtVXj\r\nsyyLFhuL0ppjztEEg7NxtH7diispNCznqm+Nfm7gNLrGvtucMc8VJTNKDJr/\r\nbxljqAKpFjgPUs4frz+yymGE05xZms4nyShO4xeOYZ2rwupFOlWlw4J+JoW0\r\nkw/lAJ8sj3UrjEnEyceFAizsXQyCF05tgzJn4/mNT7282A9k3bobwYUrKues\r\nlPZ8RcDuCwsS6M4a60X8anSuDjFqD0oY6oJm/uUvoaYqWYUGHD2PGZ/Ro8pS\r\nS0W/T77NOaC0lkO3XFzmTfJLnaDL2XCGJQo=\r\n=/uk1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jayanta525","email":"jayanta.gogoi525@gmail.com"},"directories":{},"maintainers":[{"name":"jayanta525","email":"jayanta.gogoi525@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcryptjs-react_2.4.5_1659637873380_0.33036491229600684"},"_hasShrinkwrap":false},"2.4.6":{"name":"bcryptjs-react","description":"Webpack v5 - Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.","version":"2.4.6","author":{"name":"Daniel Wirtz","email":"dcode@dcode.io"},"contributors":[{"name":"Shane Girish","email":"shaneGirish@gmail.com","url":"https://github.com/shaneGirish"},{"name":"Alex Murray","url":"https://github.com/alexmurray"},{"name":"Nicolas Pelletier","url":"https://github.com/NicolasPelletier"},{"name":"Josh Rogers","url":"https://github.com/geekymole"},{"name":"Noah Isaacson","email":"noah@nisaacson.com","url":"https://github.com/nisaacson"}],"repository":{"type":"url","url":"git+https://github.com/jayanta525/bcrypt.js-react.git"},"bugs":{"url":"https://github.com/jayanta525/bcrypt.js-react/issues"},"keywords":["bcrypt","password","auth","authentication","encryption","crypt","webpack","react","crypto"],"bin":{"bcrypt":"bin/bcrypt"},"main":"index.js","browser":"dist/bcrypt.js","dependencies":{},"devDependencies":{"bcrypt":"latest","google-closure-compiler":">=20200719","metascript":"~1.0.0","testjs":"~1"},"license":"MIT","scripts":{"test":"node node_modules/testjs/bin/testjs","build":"node scripts/build.js","compile":"node node_modules/google-closure-compiler/cli.js dist/bcrypt.js --compilation_level=SIMPLE_OPTIMIZATIONS --create_source_map=dist/bcrypt.min.map > dist/bcrypt.min.js","compress":"gzip -c -9 dist/bcrypt.min.js > dist/bcrypt.min.js.gz","make":"npm run build && npm run compile && npm run compress && npm test"},"types":"./index.d.ts","gitHead":"bd863a24d918c9d894f686d58cebafa1d93a3918","homepage":"https://github.com/jayanta525/bcrypt.js-react#readme","_id":"bcryptjs-react@2.4.6","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-dc9oUX1JwnXoSwIXL6T4p/MxPvu2AHlhmml3vA4mA/z492j3vtJl29jLylYyYtPw3OHii3gGmdNM9kYeq7ZrqA==","shasum":"493be46586f2eaaf17efd142feea617169c26881","tarball":"https://registry.npmjs.org/bcryptjs-react/-/bcryptjs-react-2.4.6.tgz","fileCount":29,"unpackedSize":224796,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBW0rnsbMldkjiUW8MObwD+xb2naXH4R3LzlILge7hpaAiAkikbVy4D6tQVbZjcD9sDHbVmtKX49llvxOrnzZCcbhA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7BxoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmotWA/+P5aFdPDsx1UjUKv5jmaOXoLYz1kdN2cmQVVe4zxOEAYzyvpH\r\nmn3rQxz79fR15dqf5N8DJ4s1124udI4/JzmWfW23BJTUI0/QH1Wc8MzxX+fJ\r\nFHf9HX5t9GOcxb2Zma/4/111XwG7V4b18ovJs/tlEX2AHMxKBICzyTJseVhT\r\nb9vRCKTGCXnpvQNYMEo0KbwcLai3XuiXiiH+tqJfa5+EOpkiB/i2zXuxT31n\r\n9qxTw1pMJibFa8JoFn8nQZE31pEWmesmgr2zJ2gL/L8543P+pGgtwa2BgQ3G\r\nGCqiwBku9nGp7DgZ0YdwiyzREw04MIaNwjM0AMs2veiyEC3MQF1zMOEZrEhY\r\nfMtrphX3JazGwAeu78UtmHy8hn9v8zGGpG+nS1JoP39hgJGQLZr6V+SwgvNz\r\nzB3jmGS6ZG0H6b4yxKbybevI5OJwyCz7LWizprnhhUK1XcfrobTnyPVe+Z/X\r\nYVI173gtbL9PmHIUZ987ThaUcINXczlRq96v0yt6dkmLdTgvp35Rhk5Dbbwp\r\nzflTTizpPu+5hTlBe2UyabOnyfunSqVVpjDFVBncfF6Zq6efvzGlqlxHi1mr\r\nL83ZZC9JRQ3ylg+1v2B2TQngLLjhWVaSSDDBQPLtiTznAD8jWfBzOgL+XGEW\r\nzHy/1KhuWfhU5X2NY/aHZbLF3QzjbdbAa80=\r\n=06p4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jayanta525","email":"jayanta.gogoi525@gmail.com"},"directories":{},"maintainers":[{"name":"jayanta525","email":"jayanta.gogoi525@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcryptjs-react_2.4.6_1659640935731_0.1298078081388876"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-04T18:31:13.380Z","2.4.5":"2022-08-04T18:31:13.822Z","modified":"2022-08-04T19:22:16.200Z","2.4.6":"2022-08-04T19:22:16.142Z"},"maintainers":[{"name":"jayanta525","email":"jayanta.gogoi525@gmail.com"}],"description":"Webpack v5 - Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.","homepage":"https://github.com/jayanta525/bcrypt.js-react#readme","keywords":["bcrypt","password","auth","authentication","encryption","crypt","webpack","react","crypto"],"repository":{"type":"url","url":"git+https://github.com/jayanta525/bcrypt.js-react.git"},"contributors":[{"name":"Shane Girish","email":"shaneGirish@gmail.com","url":"https://github.com/shaneGirish"},{"name":"Alex Murray","url":"https://github.com/alexmurray"},{"name":"Nicolas Pelletier","url":"https://github.com/NicolasPelletier"},{"name":"Josh Rogers","url":"https://github.com/geekymole"},{"name":"Noah Isaacson","email":"noah@nisaacson.com","url":"https://github.com/nisaacson"}],"author":{"name":"Daniel Wirtz","email":"dcode@dcode.io"},"bugs":{"url":"https://github.com/jayanta525/bcrypt.js-react/issues"},"license":"MIT","readme":"bcrypt.js-react\n=========\nfixed for webpack v5\n\n```\n    BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.\n    This is no longer the case. Verify if you need this module and configure a polyfill for it.\n\n    If you want to include a polyfill, you need to:\n        - add a fallback 'resolve.fallback: { \"crypto\": require.resolve(\"crypto-browserify\") }'\n        - install 'crypto-browserify'\n    If you don't want to include a polyfill, you can use an empty module like this:\n        resolve.fallback: { \"crypto\": false }\n```\n\nOptimized bcrypt in JavaScript with zero dependencies. Compatible to the C++ [bcrypt](https://npmjs.org/package/bcrypt)\nbinding on node.js and also working in the browser.\n\nInstallation\n-----------------------\n`npm i bcryptjs-react`\n\nUsage\n-----------------------\n`import bcrypt from \"bcryptjs-react\";`\n\n---\n\nbcrypt.js\n=========\nOptimized bcrypt in JavaScript with zero dependencies. Compatible to the C++ [bcrypt](https://npmjs.org/package/bcrypt)\nbinding on node.js and also working in the browser.\n\n<a href=\"https://travis-ci.org/dcodeIO/bcrypt.js\"><img alt=\"build static\" src=\"https://travis-ci.org/dcodeIO/bcrypt.js.svg?branch=master\" /></a> <a href=\"https://npmjs.org/package/bcryptjs\"><img src=\"https://img.shields.io/npm/v/bcryptjs.svg\" alt=\"\"></a> <a href=\"https://npmjs.org/package/bcryptjs\"><img src=\"https://img.shields.io/npm/dm/bcryptjs.svg\" alt=\"\"></a> <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=dcode%40dcode.io&item_name=Open%20Source%20Software%20Donation&item_number=dcodeIO%2Fbcrypt.js\"><img alt=\"donate ❤\" src=\"https://img.shields.io/badge/donate-❤-ff2244.svg\"></a>\n\n\nSecurity considerations\n-----------------------\nBesides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive function: over time, the\niteration count can be increased to make it slower, so it remains resistant to brute-force search attacks even with\nincreasing computation power. ([see](http://en.wikipedia.org/wiki/Bcrypt))\n\nWhile bcrypt.js is compatible to the C++ bcrypt binding, it is written in pure JavaScript and thus slower ([about 30%](https://github.com/dcodeIO/bcrypt.js/wiki/Benchmark)), effectively reducing the number of iterations that can be\nprocessed in an equal time span.\n\nThe maximum input length is 72 bytes (note that UTF8 encoded characters use up to 4 bytes) and the length of generated\nhashes is 60 characters.\n\nUsage\n-----\nThe library is compatible with CommonJS and AMD loaders and is exposed globally as `dcodeIO.bcrypt` if neither is\navailable.\n\n### node.js\n\nOn node.js, the inbuilt [crypto module](http://nodejs.org/api/crypto.html)'s randomBytes interface is used to obtain\nsecure random numbers.\n\n`npm install bcryptjs`\n\n```js\nvar bcrypt = require('bcryptjs');\n...\n```\n\n### Browser\n\nIn the browser, bcrypt.js relies on [Web Crypto API](http://www.w3.org/TR/WebCryptoAPI)'s getRandomValues\ninterface to obtain secure random numbers. If no cryptographically secure source of randomness is available, you may\nspecify one through [bcrypt.setRandomFallback](https://github.com/dcodeIO/bcrypt.js#setrandomfallbackrandom).\n\n```js\nvar bcrypt = dcodeIO.bcrypt;\n...\n```\n\nor\n\n```js\nrequire.config({\n    paths: { \"bcrypt\": \"/path/to/bcrypt.js\" }\n});\nrequire([\"bcrypt\"], function(bcrypt) {\n    ...\n});\n```\n\nUsage - Sync\n------------\nTo hash a password: \n\n```javascript\nvar bcrypt = require('bcryptjs');\nvar salt = bcrypt.genSaltSync(10);\nvar hash = bcrypt.hashSync(\"B4c0/\\/\", salt);\n// Store hash in your password DB.\n```\n\nTo check a password: \n\n```javascript\n// Load hash from your password DB.\nbcrypt.compareSync(\"B4c0/\\/\", hash); // true\nbcrypt.compareSync(\"not_bacon\", hash); // false\n```\n\nAuto-gen a salt and hash:\n\n```javascript\nvar hash = bcrypt.hashSync('bacon', 8);\n```\n\nUsage - Async\n-------------\nTo hash a password: \n\n```javascript\nvar bcrypt = require('bcryptjs');\nbcrypt.genSalt(10, function(err, salt) {\n    bcrypt.hash(\"B4c0/\\/\", salt, function(err, hash) {\n        // Store hash in your password DB.\n    });\n});\n```\n\nTo check a password: \n\n```javascript\n// Load hash from your password DB.\nbcrypt.compare(\"B4c0/\\/\", hash, function(err, res) {\n    // res === true\n});\nbcrypt.compare(\"not_bacon\", hash, function(err, res) {\n    // res === false\n});\n\n// As of bcryptjs 2.4.0, compare returns a promise if callback is omitted:\nbcrypt.compare(\"B4c0/\\/\", hash).then((res) => {\n    // res === true\n});\n```\n\nAuto-gen a salt and hash:\n\n```javascript\nbcrypt.hash('bacon', 8, function(err, hash) {\n});\n```\n\n**Note:** Under the hood, asynchronisation splits a crypto operation into small chunks. After the completion of a chunk, the execution of the next chunk is placed on the back of [JS event loop queue](https://developer.mozilla.org/en/docs/Web/JavaScript/EventLoop), thus efficiently sharing the computational resources with the other operations in the queue.\n\nAPI\n---\n### setRandomFallback(random)\n\nSets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto\nAPI is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it is\nseeded properly!\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| random          | *function(number):!Array.&lt;number&gt;* | Function taking the number of bytes to generate as its sole argument, returning the corresponding array of cryptographically secure random byte values. \n| **@see**        |                 | http://nodejs.org/api/crypto.html \n| **@see**        |                 | http://www.w3.org/TR/WebCryptoAPI/\n\n**Hint:** You might use [isaac.js](https://github.com/rubycon/isaac.js) as a CSPRNG but you still have to make sure to\nseed it properly.\n\n### genSaltSync(rounds=, seed_length=)\n\nSynchronously generates a salt.\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| rounds          | *number*        | Number of rounds to use, defaults to 10 if omitted \n| seed_length     | *number*        | Not supported. \n| **@returns**    | *string*        | Resulting salt \n| **@throws**     | *Error*         | If a random fallback is required but not set \n\n### genSalt(rounds=, seed_length=, callback)\n\nAsynchronously generates a salt.\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| rounds          | *number &#124; function(Error, string=)* | Number of rounds to use, defaults to 10 if omitted \n| seed_length     | *number &#124; function(Error, string=)* | Not supported. \n| callback        | *function(Error, string=)* | Callback receiving the error, if any, and the resulting salt \n| **@returns**    | *Promise*       | If `callback` has been omitted\n| **@throws**     | *Error*         | If `callback` is present but not a function\n\n### hashSync(s, salt=)\n\nSynchronously generates a hash for the given string.\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| s               | *string*        | String to hash \n| salt            | *number &#124; string* | Salt length to generate or salt to use, default to 10 \n| **@returns**    | *string*        | Resulting hash \n\n### hash(s, salt, callback, progressCallback=)\n\nAsynchronously generates a hash for the given string.\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| s               | *string*        | String to hash \n| salt            | *number &#124; string* | Salt length to generate or salt to use \n| callback        | *function(Error, string=)* | Callback receiving the error, if any, and the resulting hash \n| progressCallback | *function(number)* | Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n| **@returns**    | *Promise*       | If `callback` has been omitted\n| **@throws**     | *Error*         | If `callback` is present but not a function\n\n### compareSync(s, hash)\n\nSynchronously tests a string against a hash.\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| s               | *string*        | String to compare \n| hash            | *string*        | Hash to test against \n| **@returns**    | *boolean*       | true if matching, otherwise false \n| **@throws**     | *Error*         | If an argument is illegal \n\n### compare(s, hash, callback, progressCallback=)\n\nAsynchronously compares the given data against the given hash.\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| s               | *string*        | Data to compare \n| hash            | *string*        | Data to be compared to \n| callback        | *function(Error, boolean)* | Callback receiving the error, if any, otherwise the result \n| progressCallback | *function(number)* | Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n| **@returns**    | *Promise*       | If `callback` has been omitted \n| **@throws**     | *Error*         | If `callback` is present but not a function\n\n### getRounds(hash)\n\nGets the number of rounds used to encrypt the specified hash.\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| hash            | *string*        | Hash to extract the used number of rounds from \n| **@returns**    | *number*        | Number of rounds used \n| **@throws**     | *Error*         | If `hash` is not a string \n\n### getSalt(hash)\n\nGets the salt portion from a hash. Does not validate the hash.\n\n| Parameter       | Type            | Description\n|-----------------|-----------------|---------------\n| hash            | *string*        | Hash to extract the salt from \n| **@returns**    | *string*        | Extracted salt part \n| **@throws**     | *Error*         | If `hash` is not a string or otherwise invalid \n\n\nCommand line\n------------\n`Usage: bcrypt <input> [salt]`\n\nIf the input has spaces inside, simply surround it with quotes.\n\nDownloads\n---------\n* [Distributions](https://github.com/dcodeIO/bcrypt.js/tree/master/dist)\n* [ZIP-Archive](https://github.com/dcodeIO/bcrypt.js/archive/master.zip)\n* [Tarball](https://github.com/dcodeIO/bcrypt.js/tarball/master)\n\nCredits\n-------\nBased on work started by Shane Girish at [bcrypt-nodejs](https://github.com/shaneGirish/bcrypt-nodejs) (MIT-licensed),\nwhich is itself based on [javascript-bcrypt](http://code.google.com/p/javascript-bcrypt/) (New BSD-licensed).\n\nLicense\n-------\nNew-BSD / MIT ([see](https://github.com/dcodeIO/bcrypt.js/blob/master/LICENSE))\n","readmeFilename":"README.md"}