Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/tgcrypto/node/mod.ts>ctr256Encrypt

WASM port of pyrogram/tgcrypto
Go to Latest
function ctr256Encrypt
import { ctr256Encrypt } from "https://deno.land/x/tgcrypto@0.1.3/node/mod.ts";

Performs CTR-256 encryption.

Parameters

data: Uint8Array

The data, larger than a byte

key: Uint8Array

32-byte encryption key

iv: Uint8Array

16-byte initialization vector

state: Uint8Array

1-byte state

Returns

[Uint8Array, Uint8Array, Uint8Array]