[Yandex Cloud documentation](../../../../index.md) > [Yandex Key Management Service](../../../index.md) > API reference > REST > [Key Management Service API](../index.md) > [AsymmetricSignatureCrypto](index.md) > SignHash

# Key Management Service API, REST: AsymmetricSignatureCrypto.SignHash

Signs hash value specified KMS key.

## HTTP request

```
POST https://kms.api.cloud.yandex.net/kms/v1/asymmetricSignatureKeys/{keyId}:signHash
```

## Path parameters

#|
||Field | Description ||
|| keyId | **string**

Required field. ID of the asymmetric KMS key to use for signature.

The maximum string length in characters is 50. ||
|#

## Body parameters {#yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignHashRequest}

```json
{
  "hash": "string"
}
```

#|
||Field | Description ||
|| hash | **string** (bytes)

Required field. Hash value to be signed.
Should be encoded with base64.

The maximum string length in characters is 4096. ||
|#

## Response {#yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignHashResponse}

**HTTP Code: 200 - OK**

```json
{
  "keyId": "string",
  "signature": "string"
}
```

#|
||Field | Description ||
|| keyId | **string**

ID of the asymmetric KMS key that was used for signature. ||
|| signature | **string** (bytes)

Value of signature.
Signature value is produced in accordance with RFC 8017 for RSA
and is a DER-encoded object as defined by ANSI X9.62-2005 and RFC 3279 Section 2.2.3 for ECDSA. ||
|#