Open chausies opened 5 years ago
I have the same issue as you.
sjcl.min.js:1 Uncaught TypeError: u is not a function
at sjcl.hash.sha256.finalize (sjcl.min.js:1)
at sjcl.prng.randomWords (sjcl.min.js:1)
at Object.ja (sjcl.min.js:1)
at Object.encrypt (sjcl.min.js:1)
Same for variable t:
TypeError: t is not a function
at sjcl.cipher.aes.encrypt (evalmachine.<anonymous>:4:55)
at z (evalmachine.<anonymous>:48:471)
at sjcl.prng.randomWords (evalmachine.<anonymous>:40:197)
at Object.ja (evalmachine.<anonymous>:52:157)
at Object.encrypt (evalmachine.<anonymous>:54:174)
at sjcl.test.TestCase.doRun (evalmachine.<anonymous>:22:12)
at evalmachine.<anonymous>:84:12
at sjcl.test.TestCase.pauseAndThen (evalmachine.<anonymous>:4:33)
at sjcl.test.TestCase.run (evalmachine.<anonymous>:83:10)
at evalmachine.<anonymous>:106:29
Submitted a fix PR: https://github.com/bitwiseshiftleft/sjcl/pull/381
It's a problem that's easy to produce. If you open up the javascript console, run the code at bitwiseshiftleft.github.io/sjcl/sjcl.js (by pasting it in, for example), and then run
You get the error
TypeError: u is not a function
. It seems that sjcl tries to use a global function calledu
. I don't think that this should be the case, and sjcl should be self-contained, allowing anyone to assign anything tou
in their code.