mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 10:28:03 +01:00
Copy getRandomBytes from libaxolotl to libtextsecure
This commit is contained in:
@@ -78,6 +78,12 @@
|
||||
return encryptedBin.buffer;
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getRandomBytes: function(size) {
|
||||
var array = new Uint8Array(size);
|
||||
window.crypto.getRandomValues(array);
|
||||
return array.buffer;
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user