{
  "name": "bcrypt-nodejs",
  "description": "A native JS bcrypt library for NodeJS.",
  "main": "./bCrypt",
  "author": {
    "name": "Shane Girish",
    "email": "shaneGirish@gmail.com"
  },
  "version": "0.0.3",
  "repository": {
    "type": "git",
    "url": "https://github.com/shaneGirish/bcryptJS.git"
  },
  "bugs": {
    "url": "https://github.com/shaneGirish/bcrypt-nodejs/issues"
  },
  "contributors": [
    {
      "name": "Alex Murray",
      "url": "https://github.com/alexmurray"
    },
    {
      "name": "Nicolas Pelletier",
      "url": "https://github.com/NicolasPelletier"
    },
    {
      "name": "Josh Rogers",
      "url": "https://github.com/geekymole"
    }
  ],
  "keywords": [
    "bcrypt",
    "javascript",
    "js",
    "hash",
    "password",
    "auth",
    "authentication",
    "encryption",
    "crypt",
    "crypto"
  ],
  "readme": "bcrypt-nodejs\r\n===========================================\r\n\r\nWarning : A change was made in v0.0.3 to allow encoding of UTF-8 encoded strings. This causes strings encoded in v0.0.2 or earlier to not work in v0.0.3 anymore.\r\n\r\nNative JS implementation of BCrypt for Node.\r\nHas the same functionality as [node.bcrypt.js] expect for a few tiny differences.\r\nMainly, it doesn't let you set the seed length for creating the random byte array.\r\n\r\nI created this version due to a small [problem](https://github.com/ncb000gt/node.bcrypt.js/issues/102) I faced with [node.bcrypt.js].\r\nBasically, to deploy one of my apps which uses [node.bcrypt.js] on a winx64 platform, I have to force the user to download about 1.6gb of sdks, buildtools and other requirements of which some fail to install ! Microsoft :(\r\n\r\nThis code is based on [javascript-bcrypt] and uses [crypto] (http://nodejs.org/api/crypto.html) to create random byte arrays.\r\n\r\nBasic usage:\r\n-----------\r\nSynchronous\r\n```\r\nvar hash = bcrypt.hashSync(\"bacon\");\r\n\r\nbcrypt.compareSync(\"bacon\", hash); // true\r\nbcrypt.compareSync(\"veggies\", hash); // false\r\n```\r\n\r\nAsynchronous\r\n```\r\nbcrypt.hash(\"bacon\", null, null, function(err, hash) {\r\n\t// Store hash in your password DB.\r\n});\r\n\r\n// Load hash from your password DB.\r\nbcrypt.compare(\"bacon\", hash, function(err, res) {\r\n    // res == true\r\n});\r\nbcrypt.compare(\"veggies\", hash, function(err, res) {\r\n    // res = false\r\n});\r\n```\r\n\r\nIn the above examples, the salt is automatically generated and attached to the hash.\r\nThough you can use your custom salt and there is no need for salts to be persisted as it will always be included in the final hash result and can be retrieved.\r\n\r\nAPI\r\n-------------------------\r\n* `genSaltSync(rounds)`\r\n\t* `rounds` - [OPTIONAL] - the number of rounds to process the data for. (default - 10)\r\n* `genSalt(rounds, callback)`\r\n\t* `rounds` - [OPTIONAL] - the number of rounds to process the data for. (default - 10)\r\n\t* `callback` - [REQUIRED] - a callback to be fired once the salt has been generated.\r\n\t\t* `error` - First parameter to the callback detailing any errors.\r\n\t\t* `result` - Second parameter to the callback providing the generated salt.\r\n* `hashSync(data, salt)`\r\n\t* `data` - [REQUIRED] - the data to be encrypted.\r\n\t* `salt` - [REQUIRED] - the salt to be used in encryption.\r\n* `hash(data, salt, progress, cb)`\r\n\t* `data` - [REQUIRED] - the data to be encrypted.\r\n\t* `salt` - [REQUIRED] - the salt to be used to hash the password.\r\n\t* `progress` - a callback to be called during the hash calculation to signify progress\r\n\t* `callback` - [REQUIRED] - a callback to be fired once the data has been encrypted.\r\n\t\t* `error` - First parameter to the callback detailing any errors.\r\n\t\t* `result` - Second parameter to the callback providing the encrypted form.\r\n* `compareSync(data, encrypted)`\r\n\t* `data` - [REQUIRED] - data to compare.\r\n\t* `encrypted` - [REQUIRED] - data to be compared to.\r\n* `compare(data, encrypted, cb)`\r\n\t* `data` - [REQUIRED] - data to compare.\r\n\t* `encrypted` - [REQUIRED] - data to be compared to.\r\n\t* `callback` - [REQUIRED] - a callback to be fired once the data has been compared.\r\n\t\t* `error` - First parameter to the callback detailing any errors.\r\n\t\t* `result` - Second parameter to the callback providing whether the data and encrypted forms match [true | false].\r\n* `getRounds(encrypted)` - return the number of rounds used to encrypt a given hash\r\n\t* `encrypted` - [REQUIRED] - hash from which the number of rounds used should be extracted.\r\n\t\r\nContributors\r\n============\r\n\r\n* [Alex Murray][alexmurray]\r\n* [Nicolas Pelletier][NicolasPelletier]\r\n* [Josh Rogers][geekymole]\t\r\n\t\r\nCredits\r\n-------------------------\r\nI heavily reused code from [javascript-bcrypt]. Though \"Clipperz Javascript Crypto Library\" was removed and its functionality replaced with \"crypto\".\r\n\r\n[node.bcrypt.js]:https://github.com/ncb000gt/node.bcrypt.js.git\r\n[javascript-bcrypt]:http://code.google.com/p/javascript-bcrypt/\r\n\r\n[alexmurray]:https://github.com/alexmurray\r\n[NicolasPelletier]:https://github.com/NicolasPelletier\r\n[geekymole]:https://github.com/geekymole",
  "readmeFilename": "README.md",
  "_id": "bcrypt-nodejs@0.0.3",
  "dist": {
    "shasum": "c60917f26dc235661566c681061c303c2b28842b",
    "tarball": "http://registry.npmjs.org/bcrypt-nodejs/-/bcrypt-nodejs-0.0.3.tgz"
  },
  "_npmVersion": "1.2.0",
  "_npmUser": {
    "name": "shanegirish",
    "email": "shaneGirish@gmail.com"
  },
  "maintainers": [
    {
      "name": "shanegirish",
      "email": "shanegirish@gmail.com"
    }
  ],
  "directories": {},
  "_shasum": "c60917f26dc235661566c681061c303c2b28842b",
  "_from": "bcrypt-nodejs@",
  "_resolved": "https://registry.npmjs.org/bcrypt-nodejs/-/bcrypt-nodejs-0.0.3.tgz"
}
