encStructure
encStructure(
tag,protectedHeaderBytes):Uint8Array
Defined in: packages/filecoin-encryption-envelope/src/cose/enc-structure.ts:41
Build the Enc_structure bytes for an envelope:
[context, protected, external_aad], with external_aad always empty.
protectedHeaderBytes must be the exact bytes from the wire when decoding,
or the bytes returned by encodeProtectedHeader() when encoding. Do not
re-encode a decoded header map, as the resulting bytes may differ and break
authentication.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
tag | EnvelopeTag |
protectedHeaderBytes | Uint8Array |