function encryptBytes
encryptBytes(data: Uint8Array): Promise<Uint8Array>

Encrypt binary data with AES-256-GCM using compact binary format. Output: ENCB + version byte + 12-byte IV + ciphertext (with GCM auth tag). Overhead is only 33 bytes (vs ~76% bloat in the legacy text format).

Parameters

Return Type

Promise<Uint8Array>

Usage

import { encryptBytes } from "doc.ts";