mtcute/packages/crypto-node
teidesu 390b65f796 build(docs): api reference generation improvements
- added readme in each package
- updated typedoc, fixed related issues
- use @link instead of @see
- moved configs to typedoc.js, improved exclusion of unneeded stuff
- custom plugin for typedoc for cross-package references
- preparing to move documentation to separate repository
2022-08-24 23:37:26 +03:00
..
lib fix typo 2021-05-10 22:57:09 +02:00
src refactor: prettier-ed code, rearranged imports, fixed tests 2022-06-30 16:32:56 +03:00
tests feat: node native addon for faster aes ige 2021-05-01 21:22:20 +03:00
.gitignore feat: node native addon for faster aes ige 2021-05-01 21:22:20 +03:00
binding.gyp feat: node native addon for faster aes ige 2021-05-01 21:22:20 +03:00
package.json build(docs): api reference generation improvements 2022-08-24 23:37:26 +03:00
README.md build(docs): api reference generation improvements 2022-08-24 23:37:26 +03:00
tsconfig.json build(docs): api reference generation improvements 2022-08-24 23:37:26 +03:00
typedoc.js build(docs): api reference generation improvements 2022-08-24 23:37:26 +03:00

@mtcute/crypto-node

Native extension for NodeJS that improves performance of the most used cryptographic mode in Telegram (IGE), which is not implemented by OpenSSL.

Other modes used (i.e. CBC, CTR) and hashes are supported natively by OpenSSL, and they are faster than the custom implementation, so OpenSSL will be used for them.

Installation

You will need all the pre-requisites for node-gyp. Pre-built packages are currently not available.

Then, install the package as usual. The native library will be built automatically.

Usage

import { TelegramClient } from '@mtcute/client'
import { NodeNativeCryptoProvider } from '@mtcute/crypto-node'

const tg = new TelegramClient({
    ...,
    crypto: () => new NodeNativeCryptoProvider()
})

Acknowledgments

Based on pyrogram/tgcrypto