Skip to content

MAX_ENVELOPE_SIZE

const MAX_ENVELOPE_SIZE: 1048576 = 1048576

Defined in: packages/filecoin-encryption-envelope/src/cose/constants.ts:113

Ceiling on the encoded envelope alone, not the detached ciphertext after it.

Enforced by never handing the CBOR decoder more than this many bytes (see decode.ts), so a declared item length claiming gigabytes cannot force the allocation — the bytes to satisfy it are simply not there. Checking the result afterwards would be too late.