Nutrient Web SDK

Interface SigningData

This object can be provided optionally as part of the NutrientViewer.SignaturePreparationData passed as first argument when calling instance.signDocument() and contains the certificates, private key and signature type for the SDK to use for signing the document using the Web Crypto API.

certificates must be an Array of ArrayBuffer (DER-encoded) or string (PEM-encoded) containing X.509 certificates.

The SDK can sign the document using the Web SubtleCrypto API as long as the certificate chain and private key are provided here.

privatekey must be a string that contains the private key to sign (PEM-encoded). If privateKey is not included, NutrientViewer.TwoStepSignatureCallback needs to be passed as second argument for the instance.signDocument() call to perform the signing.

If certificates is not provided, only NutrientViewer.SignatureType.CMS can be created.

If signatureType is not provided, NutrientViewer.SignatureType.CAdES will be used by default as long as certificates is provided, and will default to NutrientViewer.SignatureType.CMS otherwise.

If timestamp is provided, the signatureType must be NutrientViewer.SignatureType.CAdES.

Interface

Properties

certificates

Optional
string[] | ArrayBuffer[]

Certificates used to sign the document. Ignored when signing with StandaloneSigningServiceData, because the signing service provides the certificate chain.

ltv

Optional
boolean

Flag to enable LTV (Long Term Validation) for the signature (Standalone only).

padesLevel

Optional
"b-b" | "b-t" | "b-lt"

PAdES level to use when creating the signature (Document Engine only). This parameter is ignored when the signatureType is cms. Defaults to b-lt.

privateKey

Optional
string

Private key used to sign the document.

"raw" | "pkcs7"

Signature container type. Can be NutrientViewer.SignatureContainerType.raw or NutrientViewer.SignatureContainerType.pkcs7.

"CMS" | "CAdES"

timestamp

Optional
{ password?: string; url: string; username?: string }

Timestamping authority information (Standalone only).

PropertyDescription
password
url
username