bitwiseshiftleft / sjcl

Stanford Javascript Crypto Library
http://bitwiseshiftleft.github.com/sjcl/
Other
7.18k stars 986 forks source link

Uncaught BUG when calling sjcl.random.startCollectors() #142

Open lencinhaus opened 10 years ago

lencinhaus commented 10 years ago

Full details:

Uncaught BUG: random: addEntropy only supports number, array of numbers or string sjcl.js:2337
sjcl.prng.addEntropy sjcl.js:2337
sjcl.prng._accelerometerCollector sjcl.js:2562
(anonymous function) sjcl.js:2459

Since I've compiled my own library, the line numbers are quite meaningless, so I'll map them to the actual code:

I'm getting this in Chrome 31.0.1650.57 on Ubuntu 13.10

Nilos commented 10 years ago

That is kind of awkward but I might have an idea what is causing it.

Nilos commented 10 years ago

ok, I am pretty sure now. The problem lies in L416. If the orientation is not available it will be a string and the addEntropy function will spit an error because it only accepts arrays of numbers.

jivinivan commented 9 years ago

:+1: