Skip to content

modern-pdf-lib


modern-pdf-lib / encodeContextTag

Function: encodeContextTag()

encodeContextTag(tag, contents): Uint8Array

Defined in: src/signature/pkcs7.ts:327

Encode a context-specific tagged value (implicit or explicit).

For PKCS#7:

  • [0] is used for content in ContentInfo (explicit, constructed)
  • [0] IMPLICIT is used for certificates in SignedData
  • [0] IMPLICIT is used for signed attributes in SignerInfo

Parameters

tag

number

contents

Uint8Array

Returns

Uint8Array

Released under the MIT License.