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
/
sha1.js
14 lines
(8 loc)
•
226 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
crypto =
require
(
'crypto'
);
async
function
SHA1
(
data
) { data =
new
Uint8Array
(data);
const
hash = crypto.
createHash
(
'sha1'
); hash.
update
(data);
return
new
Uint8Array
(hash.
digest
()); }
module
.
exports
=
SHA1
;