I have serious problems, I have a WebWorker that imports a file, but at the time of calling the function with the variable does not work. See:
importScripts(
'./libs/RSA.js'
);
self.onmessage = function (e) {
JSEncrypt.getKey(function () {
privateKey = RSA.getPrivateKey();
publicKey = RSA.getPublicKey();
});
}
The RSA file is nothing more than: link
The error returned is: Uncaught TypeError: RSA.getKey is not a function