decryptRangeWith
decryptRangeWith(
source,unwrapper,range,options?):Promise<RangeResult>
Defined in: packages/filecoin-encryption-envelope/src/range/decrypt.ts:288
Like decryptRange, but recovers the CEK from the envelope’s recipients
through unwrapper.
- Tag 96 only: a tag-16 object fails with
NoUsableRecipientErrorwithout callingunwrapper. unwrapperis called once, with copies of every recipient in wire order, also whenoptions.paramsskips the envelope read; its CEK is validated.- The range is planned first and the key recovered before the promise settles, so recipient failures reject it, never the stream.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
source | Uint8Array<ArrayBufferLike> | RandomAccessSource |
unwrapper | Unwrapper |
range | ByteRange |
options? | RangeDecryptOptions |