Skip to content

assertValidRecipientHeaders

assertValidRecipientHeaders(protectedBytes, unprotected, path): void

Defined in: packages/filecoin-encryption-envelope/src/cose/headers.ts:1001

Validate the protected and unprotected headers of a COSE_recipient without unwrapping its key.

Unsupported recipient algorithms may be skipped only after the recipient is structurally well formed. This validates its CBOR, header labels, crit, bucket overlap, and known algorithm placement rules.

A protected recipient header is either h'' or one serialized CBOR map. A256KW specifically requires h''.

ParameterType
protectedBytesUint8Array
unprotectedMap<CborValue, CborValue>
pathstring

void