> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign data

> Sign data with a KMS key from the Node.js SDK.

`client.kms().signing().sign()` signs data with a signing key in a [KMS](https://infisical.com/docs/documentation/platform/kms/overview.md) project.

## Parameters

**options** `KmsSignDataOptions` *required*

**properties**

**keyId** `string` *required*

The ID of a signing key.

**data** `string` *required*

The data to sign, encoded in base64.

**signingAlgorithm** `SigningAlgorithm` *required*

The signing algorithm, which has to suit the key. To list the algorithms that a key supports, call [`listSigningAlgorithms`](https://infisical.com/docs/sdks/languages/node/kms/list-signing-algorithms).

**isDigest** `boolean` (default: false)

Whether `data` is already a hash of the data to sign.

## Returns

**result** `KmsSignDataResponse`

**properties**

**signature** `string`

The signature, encoded in base64.

**keyId** `string`

The ID of the key that signed the data.

**signingAlgorithm** `SigningAlgorithm`

The algorithm that signed the data.

```typescript Basic theme={"dark"}
import { SigningAlgorithm } from "@infisical/sdk";

const { signature } = await client.kms().signing().sign({
  keyId: "<key-id>",
  data: Buffer.from("release-v1.4.0").toString("base64"),
  signingAlgorithm: SigningAlgorithm.RSASSA_PSS_SHA_256,
});
```

```json Response theme={"dark"}
{
  "signature": "kR4uXb9Qz2mW7tYp1LcN8sVfH3jE6aGdO0iKwB5yUrTxMhZqPlC2vJnS4eDgF7o",
  "keyId": "1f2a3b4c-5d6e-4f7a-8b9c-0d1e2f3a4b5c",
  "signingAlgorithm": "RSASSA_PSS_SHA_256"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.