Copy getRandomBytes from libaxolotl to libtextsecure

This commit is contained in:
Matt Corallo 2015-01-15 21:57:48 -10:00 committed by lilia
parent 12844590f5
commit 7d2d2d92fc
4 changed files with 14 additions and 11 deletions

View file

@ -78,6 +78,12 @@
return encryptedBin.buffer;
});
});
},
getRandomBytes: function(size) {
var array = new Uint8Array(size);
window.crypto.getRandomValues(array);
return array.buffer;
}
};
})();