scrypt.js失败,N大于2^14
scrypt.js fails with N greater than 2^14
这适用于
var scrypt = scrypt_module_factory();
var pwh=scrypt.crypto_scrypt(scrypt.encode_utf8("pleaseletmein"),
scrypt.encode_utf8("SodiumChloride"),
Math.pow(2,14), 8, 1, 224);
失败
var scrypt = scrypt_module_factory();
var pwh=scrypt.crypto_scrypt(scrypt.encode_utf8("pleaseletmein"),
scrypt.encode_utf8("SodiumChloride"),
Math.pow(2,15), 8, 1, 224);
差异在于N参数是2^15而不是2^14
有什么想法吗?
Firebug控制台中的故障如下
uncaught exception: abort() at
wa@http://localhost/keybase/javascript/scrypt.js:10126:9
ua@http://localhost/keybase/javascript/scrypt.js:132:9
nc@http://localhost/keybase/javascript/scrypt.js:1266:9
bL@http://localhost/keybase/javascript/scrypt.js:4164:33
bu@http://localhost/keybase/javascript/scrypt.js:2168:33
crypto_scrypt@http://localhost/keybase/javascript/scrypt.js:10263:1
get_salt/<.success@http://localhost/keybase/javascript/main.js:91:1
jQuery.Callbacks/fire@http://code.jquery.com/jquery-latest.js:3119:1
jQuery.Callbacks/self.fireWith@http://code.jquery.com/jquery-
latest.js:3231:7
done@http://code.jquery.com/jquery-latest.js:9275:67
.send/callback@http://code.jquery.com/jquery-latest.js:9685:8
.send@http://code.jquery.com/jquery-latest.js:9691:7
.ajax@http://code.jquery.com/jquery-latest.js:9176:5
get_salt@http://localhost/keybase/javascript/main.js:95:9
@http://localhost/keybase/javascript/main.js:58:9
jQuery.event.dispatch@http://code.jquery.com/jquery-latest.js:4641:1
jQuery.event.add/elemData.handle@http://code.jquery.com/jquery-
latest.js:4309:1
var scrypt = scrypt_module_factory(67108864);
修复了问题。感谢上面的Anton Samsonov。这是一个记忆问题。不带参数的初始化默认为32mb。如上所述初始化会将内存使用率设置为64mb。
相关文章:
- 可以't让我的if语句处理js中的html表单输入
- 使用agility.js进行页面布局和合成
- 使用Clipboard.js复制span文本
- scrypt.js失败,N大于2^14
- Angular JS字段仅当其值大于tan零时有效
- 如果输入日期大于js中定义的日期,如何发出警报
- 返回的y值大于实际y位置[JS(无jQ)/DOM]
- 裁剪后的图像大于 coppit.js 中以像素为单位的内在大小
- Easel.JS>位图大于画布..但显示得较小
- JS导致窗口大小大于所需大小-Dropdown错误
- 如何使用underscore.js获取对象中大于特定值的值列表
- JS:更好的说法是“如果var1大于var0,那么将var1赋值给var0”
- Bootstrap-datepicker.js自动关闭且不大于这个月
- JS - windows的宽度从大于800px的像素减少到800px以下会触发一个动作
- 在Angular JS指令中,number大于0
- JS“大于”;操作符;
- Knockout JS删除选项,如果value大于(on foreach)
- 如何使用jquery/js检查时间范围是否大于7周
- Node.js记录日期大于当前客户端日期
- SimpleModal JS的高度大于浏览器的高度是不可滚动的