Skip to content

HEADER_PLAINTEXT_LENGTH

const HEADER_PLAINTEXT_LENGTH: -65789 = -65789

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

plaintext_length, private use (RFC 9052 §3.1). Optional; written only when the caller knew the content length before the envelope was emitted.

Being protected is what makes it a truncation check: an attacker can neither edit it to match a short object nor strip it to escape the comparison, since both change the AAD and fail every chunk tag.

Do not renumber this to -65791: see docs/tech-spec.md, “plaintext_length and truncation”.