Skip to content

Interface: Signer ​

Defined in: types.ts:10

The host's signer. The key stays with the host: sign receives the bytes to sign and returns the raw signature, which may come from a KMS, a subprocess or a file key. For ES256 that is the fixed-width r || s, not DER; Node gives it with dsaEncoding: 'ieee-p1363'.

Properties ​

alg ​

alg: SigningAlg

Defined in: types.ts:11


certificates ​

certificates: string | readonly Uint8Array<ArrayBufferLike>[]

Defined in: types.ts:13

The certificate chain, end-entity first: PEM text, or DER as bytes. c2pa-rs refuses a self-signed signing certificate, so a CA and a certificate under it is the minimum.


reserveSize? ​

optional reserveSize?: number

Defined in: types.ts:18

Bytes reserved for the signature. The default fits every algorithm, with a timestamp.


timestampAuthority? ​

optional timestampAuthority?: string

Defined in: types.ts:16

An RFC 3161 timestamp authority, such as http://timestamp.digicert.com. Reached with fetch.

Methods ​

sign() ​

sign(bytes): Uint8Array<ArrayBufferLike> | Promise<Uint8Array<ArrayBufferLike>>

Defined in: types.ts:14

Parameters ​

bytes ​

Uint8Array

Returns ​

Uint8Array<ArrayBufferLike> | Promise<Uint8Array<ArrayBufferLike>>