Skip to main content
Module

x/mtkruto/0_deps.ts>ctr256Encrypt

[WIP] Cross-runtime JavaScript library for building Telegram clients
Go to Latest
function ctr256Encrypt
import { ctr256Encrypt } from "https://deno.land/x/mtkruto@0.0.995/0_deps.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]