package.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. {
  2. "name": "bcrypt",
  3. "description": "A bcrypt library for NodeJS.",
  4. "keywords": [
  5. "bcrypt",
  6. "password",
  7. "auth",
  8. "authentication",
  9. "encryption",
  10. "crypt",
  11. "crypto"
  12. ],
  13. "main": "./bcrypt",
  14. "version": "0.7.8",
  15. "author": {
  16. "name": "Nick Campbell",
  17. "url": "https://github.com/ncb000gt"
  18. },
  19. "engines": {
  20. "node": ">= 0.6.0"
  21. },
  22. "repository": {
  23. "type": "git",
  24. "url": "https://github.com/ncb000gt/node.bcrypt.js.git"
  25. },
  26. "licenses": [
  27. {
  28. "type": "MIT"
  29. }
  30. ],
  31. "bugs": {
  32. "url": "https://github.com/ncb000gt/node.bcrypt.js/issues"
  33. },
  34. "scripts": {
  35. "test": "node-gyp configure build && nodeunit test",
  36. "install": "node-gyp rebuild"
  37. },
  38. "dependencies": {
  39. "bindings": "1.0.0"
  40. },
  41. "devDependencies": {
  42. "nodeunit": ">=0.6.4"
  43. },
  44. "contributors": [
  45. {
  46. "name": "Antonio Salazar Cardozo",
  47. "email": "savedfastcool@gmail.com",
  48. "url": "https://github.com/Shadowfiend"
  49. },
  50. {
  51. "name": "Van Nguyen",
  52. "email": "the.gol.effect@gmail.com",
  53. "url": "https://github.com/thegoleffect"
  54. },
  55. {
  56. "name": "David Trejo",
  57. "email": "david@dtrejo.com",
  58. "url": "https://github.com/dtrejo"
  59. },
  60. {
  61. "name": "Ben Glow",
  62. "email": "glen.low@pixelglow.com",
  63. "url": "https://github.com/pixelglow"
  64. },
  65. {
  66. "name": "NewITFarmer.com",
  67. "url": "https://github.com/newitfarmer"
  68. },
  69. {
  70. "name": "Alfred Westerveld",
  71. "email": "alfredwesterveld@gmail.com",
  72. "url": "https://github.com/alfredwesterveld"
  73. },
  74. {
  75. "name": "Vincent Côté-Roy",
  76. "email": "vincentcr@gmail.com",
  77. "url": "https://github.com/vincentcr"
  78. },
  79. {
  80. "name": "Lloyd Hilaiel",
  81. "email": "lloyd@hilaiel.com",
  82. "url": "https://github.com/lloyd"
  83. },
  84. {
  85. "name": "Roman Shtylman",
  86. "email": "shtylman@gmail.com",
  87. "url": "https://github.com/shtylman"
  88. },
  89. {
  90. "name": "Vadim Graboys",
  91. "email": "dimva13@gmail.com",
  92. "url": "https://github.com/vadimg"
  93. },
  94. {
  95. "name": "Ben Noorduis",
  96. "url": "https://github.com/bnoordhuis"
  97. },
  98. {
  99. "name": "Nate Rajlich",
  100. "email": "nathan@tootallnate.net",
  101. "url": "https://github.com/tootallnate"
  102. },
  103. {
  104. "name": "Sean McArthur",
  105. "email": "sean.monstar@gmail.com",
  106. "url": "https://github.com/seanmonstar"
  107. },
  108. {
  109. "name": "Fanie Oosthuysen",
  110. "email": "fanie.oosthuysen@gmail.com",
  111. "url": "https://github.com/weareu"
  112. }
  113. ],
  114. "gypfile": true,
  115. "readme": "# node.bcrypt.js\n\n[![Build Status](https://secure.travis-ci.org/ncb000gt/node.bcrypt.js.png)](http://travis-ci.org/#!/ncb000gt/node.bcrypt.js) \n\nLib to help you hash passwords.\n[bcrypt on wikipedia][bcryptwiki]\n\nCatalyst for this module: [How To Safely Store A Password][codahale]\n\n## If You Are Submitting Bugs/Issues\n\nFirst, make sure that the version of node you are using is a _stable_ version. You'll know this because it'll have an even major release number. We do not currently support unstable versions and while the module may happen to work on some unstable versions you'll find that we quickly close issues if you're not using a stable version.\n\nIf you are on a stable version of node, we can't magically know what you are doing to expose an issue, it is best if you provide a snippet of code or log files if you're having an install issue. This snippet need not include your secret sauce, but it must replicate the issue you are describing. The issues that get closed without resolution tend to be the ones that don't help us help you. Thanks.\n\n\n## Version Compatibility\n\n| Node Version | Bcrypt Version |\n| ---- | ---- |\n| <= 0.4.x | <= 0.4.x |\n| >= 0.6.x | >= 0.5.x |\n\nWindows users should make sure to have at least node 0.8.5 installed and version >= 0.7.1 of this module. \n`node-gyp` only works with stable/released versions of node. Since the `bcrypt` module uses `node-gyp` to build and install you'll need a stable version of node to use bcrypt. If you do not you'll likely see an error that starts with:\n\n gyp ERR! stack Error: \"pre\" versions of node cannot be installed, use the --nodedir flag instead\n\n\n\n## Security Issues/Concerns\n\nAs should be the case with any security tool, this library should be scrutinized by anyone using it. If you find or suspect an issue with the code- please bring it to my attention and I'll spend some time trying to make sure that this tool is as secure as possible.\n\nTo make it easier for people using this tool to analyze what has been surveyed, here is a list of BCrypt related security issues/concerns as they've come up.\n\n* An [issue with passwords][jtr] was found with a version of the Blowfish algorithm developed for John the Ripper. This is not present in the OpenBSD version and is thus not a problem for this module. HT [zooko][zooko].\n\n## Dependencies\n\n* NodeJS\n* `node-gyp`\n * Please check the dependencies for this tool at: https://github.com/TooTallNate/node-gyp/\n * Windows users will need the options for c# and c++ installed with their visual studio instance.\n * Python 2.x\n\n## Install via NPM\n```\nnpm install bcrypt\n```\n\n***Note:*** OS X users using Xcode 4.3.1 or above may need to run the following command in their terminal prior to installing if errors occur regarding xcodebuild: ```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer```\n\n## Usage\n\n### async (recommended)\n\nTo hash a password:\n\n```javascript\nvar bcrypt = require('bcrypt');\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\nAuto-gen a salt and hash:\n\n```javascript\nbcrypt.hash('bacon', 8, function(err, hash) {\n});\n```\n\n\n### sync\n\nTo hash a password:\n\n```javascript\nvar bcrypt = require('bcrypt');\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\n## API\n\n`BCrypt.`\n\n * `genSaltSync(rounds)`\n * `rounds` - [OPTIONAL] - the number of rounds to process the data for. (default - 10)\n * `genSalt(rounds, cb)`\n * `rounds` - [OPTIONAL] - the number of rounds to process the data for. (default - 10)\n * `cb` - [REQUIRED] - a callback to be fired once the salt has been generated. uses eio making it asynchronous.\n * `err` - First parameter to the callback detailing any errors.\n * `salt` - Second parameter to the callback providing the generated salt.\n * `hashSync(data, salt)`\n * `data` - [REQUIRED] - the data to be encrypted.\n * `salt` - [REQUIRED] - the salt to be used in encryption.\n * `hash(data, salt, cb)`\n * `data` - [REQUIRED] - the data to be encrypted.\n * `salt` - [REQUIRED] - the salt to be used to hash the password. if specified as a number then a salt will be generated and used (see examples).\n * `cb` - [REQUIRED] - a callback to be fired once the data has been encrypted. uses eio making it asynchronous.\n * `err` - First parameter to the callback detailing any errors.\n * `encrypted` - Second parameter to the callback providing the encrypted form.\n * `compareSync(data, encrypted)`\n * `data` - [REQUIRED] - data to compare.\n * `encrypted` - [REQUIRED] - data to be compared to.\n * `compare(data, encrypted, cb)`\n * `data` - [REQUIRED] - data to compare.\n * `encrypted` - [REQUIRED] - data to be compared to.\n * `cb` - [REQUIRED] - a callback to be fired once the data has been compared. uses eio making it asynchronous.\n * `err` - First parameter to the callback detailing any errors.\n * `same` - Second parameter to the callback providing whether the data and encrypted forms match [true | false].\n * `getRounds(encrypted)` - return the number of rounds used to encrypt a given hash\n * `encrypted` - [REQUIRED] - hash from which the number of rounds used should be extracted.\n\n\n## Hash Info\n\nThe characters that comprise the resultant hash are `./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$`.\n\n## Testing\n\nIf you create a pull request, tests better pass :)\n\n```\nnpm install\nnpm test\n```\n\n## Credits\n\nThe code for this comes from a few sources:\n\n* blowfish.cc - OpenBSD\n* bcrypt.cc - OpenBSD\n* bcrypt::gen_salt - [gen_salt inclusion to bcrypt][bcryptgs]\n* bcrypt_node.cc - me\n\n## Contributors\n\n* [Antonio Salazar Cardozo][shadowfiend] - Early MacOS X support (when we used libbsd)\n* [Ben Glow][pixelglow] - Fixes for thread safety with async calls\n* [Van Nguyen][thegoleffect] - Found a timing attack in the comparator\n* [NewITFarmer][newitfarmer] - Initial Cygwin support\n* [David Trejo][dtrejo] - packaging fixes\n* [Alfred Westerveld][alfredwesterveld] - packaging fixes\n* [Vincent Côté-Roy][vincentr] - Testing around concurrency issues\n* [Lloyd Hilaiel][lloyd] - Documentation fixes\n* [Roman Shtylman][shtylman] - Code refactoring, general rot reduction, compile options, better memory management with delete and new, and an upgrade to libuv over eio/ev.\n* [Vadim Graboys][vadimg] - Code changes to support 0.5.5+\n* [Ben Noordhuis][bnoordhuis] - Fixed a thread safety issue in nodejs that was perfectly mappable to this module.\n* [Nate Rajlich][tootallnate] - Bindings and build process.\n* [Sean McArthur][seanmonstar] - Windows Support\n* [Fanie Oosthuysen][weareu] - Windows Support\n\n## License\nUnless stated elsewhere, file headers or otherwise, the license as stated in the LICENSE file.\n\n[bcryptwiki]: http://en.wikipedia.org/wiki/Bcrypt\n[bcryptgs]: http://mail-index.netbsd.org/tech-crypto/2002/05/24/msg000204.html\n[codahale]: http://codahale.com/how-to-safely-store-a-password/\n[gh13]: https://github.com/ncb000gt/node.bcrypt.js/issues/13\n[jtr]: http://www.openwall.com/lists/oss-security/2011/06/20/2\n\n[shadowfiend]:https://github.com/Shadowfiend\n[thegoleffect]:https://github.com/thegoleffect\n[pixelglow]:https://github.com/pixelglow\n[dtrejo]:https://github.com/dtrejo\n[alfredwesterveld]:https://github.com/alfredwesterveld\n[newitfarmer]:https://github.com/newitfarmer\n[zooko]:https://twitter.com/zooko\n[vincentr]:https://twitter.com/vincentcr\n[lloyd]:https://github.com/lloyd\n[shtylman]:https://github.com/shtylman\n[vadimg]:https://github.com/vadimg\n[bnoordhuis]:https://github.com/bnoordhuis\n[tootallnate]:https://github.com/tootallnate\n[seanmonstar]:https://github.com/seanmonstar\n[weareu]:https://github.com/weareu\n",
  116. "readmeFilename": "README.md",
  117. "homepage": "https://github.com/ncb000gt/node.bcrypt.js",
  118. "_id": "bcrypt@0.7.8",
  119. "_shasum": "42c99aac202918e947b5bd086110184f62745e3e",
  120. "_from": "bcrypt@^0.7.8",
  121. "_resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-0.7.8.tgz"
  122. }