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
/
node
/
get-random-bytes.js
8 lines
(5 loc)
•
158 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
const
crypto =
require
(
'crypto'
);
function
getRandomBytes
(
length
) {
return
new
Uint8Array
(crypto.
randomBytes
(length)); }
module
.
exports
= getRandomBytes;