var crypto = require("crypto");
var mykey=crypto.createDiffieHellman(64);
node-webkit 运行到 createDiffieHellman就死掉。
但node.js的程序里 crypto 一点问题没有,比如
var crypto = require("crypto");
var text = "abcdefg";
var alice=crypto.createDiffieHellman(64);
var bob=crypto.createDiffieHellman(64);
var a=alice.generateKeys("hex");
var b=bob.generateKeys("hex");
var s1=bob.computeSecret(a,"hex","hex");
var s2=alice.computeSecret(b,"hex","hex");
var cipher1= crypto.createCipher('blowfish', s1);
var cipher2= crypto.createCipher('blowfish', s2);
...