Crypto Lib
    Preparing search index...

    Interface DecryptStreamOptions

    Options for creating a decrypt transform stream.

    const opts: DecryptStreamOptions = { key: "aa".repeat(32) };
    
    interface DecryptStreamOptions {
        key: string | Uint8Array<ArrayBufferLike>;
        chunkSize?: number;
        format?: "stream" | "single-message";
    }
    Index
    key: string | Uint8Array<ArrayBufferLike>

    256-bit key as hex string or Uint8Array.

    chunkSize?: number

    Chunk size used during encryption (default: 65536 = 64 KiB).

    format?: "stream" | "single-message"

    "stream" (the default) reads the chunked format that createEncryptStream and streamEncrypt write. "single-message" reads the format createEncryptStream wrote before 0.0.36 (nonce || ciphertext || tag); it can only be checked once all of it has arrived, so it is buffered whole.