} else {
padding = 4;
}
-
+
var key = parseKeys(private_key);
var k = key.modulus.byteLength();
if (enc.length > k || new bn(enc).cmp(key.modulus) >= 0) {
if (!(context instanceof Context)) {
throw new TypeError("needs a 'context' argument.");
}
-
+
var iframe = document.createElement('iframe');
if (!iframe.style) iframe.style = {};
iframe.style.display = 'none';
-
+
document.body.appendChild(iframe);
-
+
var win = iframe.contentWindow;
var wEval = win.eval, wExecScript = win.execScript;
wExecScript.call(win, 'null');
wEval = win.eval;
}
-
+
forEach(Object_keys(context), function (key) {
win[key] = context[key];
});
win[key] = context[key];
}
});
-
+
var winKeys = Object_keys(win);
var res = wEval.call(win, this.code);
-
+
forEach(Object_keys(win), function (key) {
// Avoid copying circular objects like `top` and `window` by only
// updating existing context properties or new properties in the `win`
defineProp(context, key, win[key]);
}
});
-
+
document.body.removeChild(iframe);
-
+
return res;
};