[英]Node crypto pbkdf2 yields different keys on 32bit and 64bit machines
The following snippet seems to yield different answers on 32 bit and 64 bit machines. 以下代码片段似乎在32位和64位计算机上产生了不同的答案。
var buf = new Buffer('ojHkXkabdV7X6xcDNKJgrg==', 'base64');
console.log(crypto.pbkdf2Sync('secret', buf.toString('binary'), 10000, 14, 'sha256').toString('base64'));
64bit machine is on Node v0.12.4. 64位计算机位于节点v0.12.4上。
32bit machine is on Node v0.10.12. 32位计算机位于节点v0.10.12上。
Is this even possible ? 这有可能吗?
I moved node from v0.12.4 to v0.10.12 on the 64 bIt machine and the keys match when the snippet is run on both machines. 我将节点从64 bIt机器上的v0.12.4移到了v0.10.12,并且在两台机器上都运行了代码段时,键是匹配的。
I also found the implementation that I really needed resides in v0.12.4 therefore my solution to this issue is to upgrade the 32 bit machine to v0.12.4. 我还发现我真正需要的实现驻留在v0.12.4中,因此针对此问题的解决方案是将32位计算机升级到v0.12.4。
Sorry folks ! 抱歉! This is not an architecture problem.
这不是体系结构问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.