UNPKG
telegram-mtproto
Version:
alpha (3.2.11)
beta (2.2.2)
latest (1.0.5)
mtproto2 (2.1.1)
3.2.11
3.2.10
3.2.9
3.2.8
3.2.8-dev.1
3.2.8-dev.0
3.2.7
3.2.6
3.2.5
3.2.4
3.2.3
3.2.2
3.2.1
3.2.0
3.1.3
3.1.2
3.1.0
3.0.8
3.0.7
3.0.6
3.0.5-unstable
3.0.4-unstable
3.0.2
3.0.1
3.0.0-experimental
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.1
2.1.0
2.0.1
2.0.0
1.1.0
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.9.15
0.9.14
Telegram MTProto library
github.com/zerobias/telegram-mtproto
zerobias/telegram-mtproto
telegram-mtproto
/
src
/
service
/
secure-random.js
13 lines
(10 loc)
•
232 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
//@flow
import
RandomBytes
from
'randombytes'
const
getRandom
= (
arr
:
number
[]
) => {
const
ln = arr.
length
const
buf =
RandomBytes
(ln)
for
(
let
i =
0
; i < ln; i++) arr[i] = buf[i]
return
arr }
export
default
getRandom