Copy getRandomBytes from libaxolotl to libtextsecure
This commit is contained in:
parent
12844590f5
commit
7d2d2d92fc
4 changed files with 14 additions and 11 deletions
|
@ -78,6 +78,12 @@
|
|||
return encryptedBin.buffer;
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getRandomBytes: function(size) {
|
||||
var array = new Uint8Array(size);
|
||||
window.crypto.getRandomValues(array);
|
||||
return array.buffer;
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue