UNPKG

@mt-proto/ncore

Version:

Telegram API JS (MTProto) client library for Node.js and browser

14 lines (8 loc) 239 B
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;