Replaced frontend getString calls broken in d3c158f.

Closes #224
This commit is contained in:
Patrick Connolly 2015-04-15 00:46:06 -04:00 committed by lilia
parent 90c742d57c
commit b5d724ffc3
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@
if (request.path == "/v1/address" && request.verb == "PUT") {
var proto = textsecure.protobuf.ProvisioningUuid.decode(request.body);
var url = [ 'tsdevice:/', '?uuid=', proto.uuid, '&pub_key=',
encodeURIComponent(btoa(getString(cryptoInfo.pubKey))) ].join('');
encodeURIComponent(btoa(String.fromCharCode.apply(null, new Uint8Array(cryptoInfo.pubKey)))) ].join('');
$('#status').text('');
qrCode.makeCode(url);
request.respond(200, 'OK');

View file

@ -85,7 +85,7 @@
var verificationCode = $('#code').val().replace(/\D+/g, "");
var signalingKey = textsecure.crypto.getRandomBytes(32 + 20);
var password = btoa(getString(textsecure.crypto.getRandomBytes(16)));
var password = btoa(String.fromCharCode.apply(null, new Uint8Array(textsecure.crypto.getRandomBytes(16))));
password = password.substring(0, password.length - 2);
var registrationId = new Uint16Array(textsecure.crypto.getRandomBytes(2))[0];