Tag: bcrypt

什么是bcrypt与节点一起使用的替代scheme?

我已经尝试了几天得到bcrypt安装在我的Windows机器上没有运气。 其中一个依赖项(Windows 7 SDK)不希望被安装,即使我已经尝试了许多来自networking的build议,但它拒绝合作。 我需要一个很好的替代方法来encryption这个没有任何依赖关系的东西。 谢谢。

比较PHP和NodeJS之间的BCrypt哈希

对于我正在开发的应用程序,nodejs需要validation由PHP创build的散列,反之亦然。 问题是,在PHP中生成的哈希值(通过Laravel的Hash类,只使用PHP的password_hash函数)在node.js中testing时返回false。 以下的node.js脚本: var bcrypt = require('bcrypt'); var password = 'password'; var phpGeneratedHash = '$2y$10$jOTwkwLVn6OeA/843CyIHu67ib4RixMa/N/pTJVhOjTddvrG8ge5.'; var nodeGeneratedHash = '$2a$10$ZiBH5JtTDtXqDajO6f4EbeBIXGwtcGg2MGwr90xTH9ki34SV6rZhO'; console.log( bcrypt.compareSync(password, phpGeneratedHash) ? 'PHP passed' : 'PHP failed', bcrypt.compareSync(password, nodeGeneratedHash) ? 'nodejs passed' : 'nodejs failed' ); 输出:'PHP失败的nodejs通过',而下面的PHP脚本: <?php $password = 'password'; $phpGeneratedHash = '$2y$10$jOTwkwLVn6OeA/843CyIHu67ib4RixMa/N/pTJVhOjTddvrG8ge5.'; $nodeGeneratedHash = '$2a$10$ZiBH5JtTDtXqDajO6f4EbeBIXGwtcGg2MGwr90xTH9ki34SV6rZhO'; print password_verify($password, $phpGeneratedHash) ? 'PHP passed' : […]

编译bcrypt – node.js时出错

我试图通过npm install使用Windows 7旗舰版x64安装bycrpt。 这是我的安装日志: D:\Dropbox\Projekte\RZ\Finance-Man-GUI\node_modules\bcrypt>node "C:\Program File s\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node -gyp.js" rebuild npm http GET https://registry.npmjs.org/mime/1.2.6 npm http 304 https://registry.npmjs.org/coffee-script npm http 304 https://registry.npmjs.org/mkdirp npm http 304 https://registry.npmjs.org/cssom npm http 304 https://registry.npmjs.org/hooks/0.2.1 npm http 304 https://registry.npmjs.org/mongodb/1.2.8 npm http 304 https://registry.npmjs.org/ms/0.1.0 npm http 304 https://registry.npmjs.org/sliced/0.0.3 npm http 304 https://registry.npmjs.org/muri/0.1.0 npm http 304 https://registry.npmjs.org/mime/1.2.6 npm http GET https://registry.npmjs.org/crc/0.2.0 npm […]

NodeJS:bcrypt与原生密码

有人能指出两者之间的差异,以及各自使用的示例情况吗? bcrypt看起来不错。

用npm安装bcrypt时出错

我无法在我的机器上使用npm安装bcrypt因为我遇到以下错误。 我一直在解决这个问题,没有太多的运气。 你能推荐任何步骤来诊断或修复这个问题,所以我可以成功运行npm install bcrypt吗? Someones-Macbook:node_modules Cody$ npm install bcrypt npm WARN package.json grunt-contrib-htmlmin@0.1.3 No README data | > bcrypt@0.7.7 install /Applications/MAMP/htdocs/richintime/ultimate-seed/node_modules/bcrypt > node-gyp rebuild child_process: customFds option is deprecated, use stdio instead. CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o ../src/bcrypt_node.cc:118:18: error: no member named 'Dispose' in 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >' callback.Dispose(); ~~~~~~~~ ^ ../src/bcrypt_node.cc:202:19: error: unknown […]