Skip to content

decryptWith

decryptWith(unwrapper): ReadableWritablePair<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>

Defined in: packages/filecoin-encryption-envelope/src/aes-gcm-stream.ts:472

Decrypt a scheme-2 object using a CEK recovered by unwrapper.

For tag 96, the unwrapper is called once with isolated copies of all recipients in wire order. A tag-16 object has no recipients and fails without calling it. The returned CEK is validated before any chunk is decrypted. As with decrypt, discard plaintext already read if the stream fails.

ParameterType
unwrapperUnwrapper

ReadableWritablePair<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>