UNPKG
mtproton
Version:
latest (6.0.0)
6.0.0
5.9.0
Telegram API JS (MTProto) client library for browser and nodejs
mtproton
/
envs
/
browser
/
get-random-bytes.js
8 lines
(6 loc)
•
159 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
function
getRandomBytes
(
length
) {
const
bytes =
new
Uint8Array
(length); crypto.
getRandomValues
(bytes);
return
bytes; }
module
.
exports
= getRandomBytes;