Create a TransformStream that decrypts XChaCha20-Poly1305 data.
Accumulates all input chunks (expecting nonce || ciphertext || tag), then on flush decrypts and emits the plaintext.
nonce || ciphertext || tag
Decryption options containing the 256-bit key.
A TransformStream that accepts encrypted Uint8Array chunks and emits plaintext.
const key = "aa".repeat(32);const stream = createDecryptStream({ key });const writer = stream.writable.getWriter();await writer.write(ciphertext);await writer.close(); Copy
const key = "aa".repeat(32);const stream = createDecryptStream({ key });const writer = stream.writable.getWriter();await writer.write(ciphertext);await writer.close();
Create a TransformStream that decrypts XChaCha20-Poly1305 data.
Accumulates all input chunks (expecting
nonce || ciphertext || tag), then on flush decrypts and emits the plaintext.