I need to create a secure 50 character random string in user browsers.
Looking at sjcl.prng I still have this:
$(document).ready(function () {
sjcl.random = new sjcl.prng(8);
sjcl.random.startCollectors();
$("body").on('mousemove', function() {
console.log(sjcl.random.getProgress(8));
if(sjcl.random.isReady(8) === 2) {
sjcl.random.stopCollectors();
console.log(sjcl.random.randomWords(5,8));
}
});
});
After you move the mouse I get a byte array for some time as follows: [-579285364, 1099191484, 94979086, -1572161987, -570940948].
But what I'm looking for is an 50-character alphanumeric string. My knowledge on this topic is limited, and I'm looking for some help here.
source
share