Fix exception in options.js on first run

Fixes #22 Uncaught ReferenceError: getRandomBytes is not defined
options.js:41
This commit is contained in:
lilia 2014-05-11 14:44:32 -07:00
parent 3b79dd256c
commit 1d95fcc027
3 changed files with 5 additions and 4 deletions

View file

@ -38,8 +38,8 @@ $('#number').on('change', function() {//TODO
});
var single_device = false;
var signaling_key = getRandomBytes(32 + 20);
var password = btoa(getString(getRandomBytes(16)));
var signaling_key = window.crypto.getRandomBytes(32 + 20);
var password = btoa(getString(window.crypto.getRandomBytes(16)));
password = password.substring(0, password.length - 2);
$('#init-go-single-client').click(function() {