Open medi11 opened 3 years ago
In order to enable some sjlc modules it is required to re-compile the library yourself.
$ git clone https://github.com/bitwiseshiftleft/sjcl.git
$ cd sjcl
$ ./configure # Requests for extensions go here, e.g. --with-ecc --with-srp
$ make sjcl.js
$ make test # If any of the tests fail, beware.
Then reference your build of sjlc in your code:
import sjcl from <path_to_local_build>/sjcl";
Here is a code snippet. whenever I execute it I get the above error `const sjcl = require("sjcl"); var gkey1 = sjcl.ecc.elGamal.generateKeys(384, 10); var alicekeys = gkey1.pub.kem(10);
var gkey2 = sjcl.ecc.elGamal.generateKeys(384, 10); var bobkeys = gkey2.pub.kem(10);
var aliceshared = alicekeys.key; var bobshared = gkey2.sec.unkem(alicekeys.tag); `