# Data Loss Prevention V2 Client - Class KmsWrappedCryptoKey (2.13.0)

2.13.0 (latest) 2.12.0 2.11.0 2.10.0 2.9.2 2.8.1 2.7.0 2.6.1 2.4.1 2.3.0 2.2.3 2.1.0 2.0.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.1 1.14.0 1.13.2 1.12.0 1.11.0 1.10.2 1.9.0 1.8.6 Reference documentation and code samples for the Data Loss Prevention V2 Client class KmsWrappedCryptoKey.

Include to use an existing data crypto key wrapped by KMS.

The wrapped key must be a 128-, 192-, or 256-bit key.
Authorization requires the following IAM permissions when sending a request
to perform a crypto transformation using a KMS-wrapped crypto key:
dlp.kms.encrypt
For more information, see [Creating a wrapped key](https://cloud.google.com/sensitive-data-protection/docs/create-wrapped-key).
Note: When you use Cloud KMS for cryptographic operations,
[charges apply](https://cloud.google.com/kms/pricing).

Generated from protobuf message `google.privacy.dlp.v2.KmsWrappedCryptoKey`

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ wrapped_key` | `string` Required. The wrapped data crypto key. |
| `↳ crypto_key_name` | `string` Required. The resource name of the KMS CryptoKey to use for unwrapping. |

### getWrappedKey

Required. The wrapped data crypto key.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setWrappedKey

Required. The wrapped data crypto key.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCryptoKeyName

Required. The resource name of the KMS CryptoKey to use for unwrapping.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setCryptoKeyName

Required. The resource name of the KMS CryptoKey to use for unwrapping.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |