---
title: "PreparedSignature"
version: "0.9.0"
url: "https://docs.laminapdf.com/reference/sdk/interfaces/preparedsignature/"
---

# PreparedSignature

Defined in: [packages/sdk/src/types.ts:1677](https://github.com/laudebugs/laminapdf/blob/v0.9.0/packages/sdk/src/types.ts#L1677)

What the signer signs, from [Document.prepareSignature](/reference/sdk/classes/document.md#preparesignature): `toBeSigned` (the DER of the
signed attributes), the hash to apply (`digestAlgorithm`), the signature algorithm the
certificate's key calls for (`algorithm`) and the bytes of signature the file has room for
(`capacity`).

## Since

0.7.0

## Properties

### algorithm

```ts
readonly algorithm: "ecdsaP256" | "ecdsaP384" | "rsaPkcs1v15";
```

Defined in: [packages/sdk/src/types.ts:1683](https://github.com/laudebugs/laminapdf/blob/v0.9.0/packages/sdk/src/types.ts#L1683)

The algorithm of the certificate's key.

***

### capacity

```ts
readonly capacity: number;
```

Defined in: [packages/sdk/src/types.ts:1685](https://github.com/laudebugs/laminapdf/blob/v0.9.0/packages/sdk/src/types.ts#L1685)

The bytes of signature the file has room for.

***

### digestAlgorithm

```ts
readonly digestAlgorithm: "sha256" | "sha384" | "sha512";
```

Defined in: [packages/sdk/src/types.ts:1681](https://github.com/laudebugs/laminapdf/blob/v0.9.0/packages/sdk/src/types.ts#L1681)

The hash the signer applies.

***

### toBeSigned

```ts
readonly toBeSigned: Uint8Array<ArrayBuffer>;
```

Defined in: [packages/sdk/src/types.ts:1679](https://github.com/laudebugs/laminapdf/blob/v0.9.0/packages/sdk/src/types.ts#L1679)

The bytes to sign: hash them with [PreparedSignature.digestAlgorithm](/reference/sdk/interfaces/preparedsignature.md#digestalgorithm), then sign the hash.
