# Google.Play.Integrity.IntegrityManager

Manages requests for integrity information.

## Summary

DEPRECATED: Please use [IntegrityManagerV2](https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityManagerV2#classGoogle_1_1Play_1_1Integrity_1_1IntegrityManagerV2) instead.

| ### Constructors and Destructors ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityManager#classGoogle_1_1Play_1_1Integrity_1_1IntegrityManager_1aef6c7500ed0bb4ad5e7f6e9d835a39fe()` Constructor. ||

| ### Public functions ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityManager#classGoogle_1_1Play_1_1Integrity_1_1IntegrityManager_1a1dcfd0e7f77001135c708d6420d0b98e(https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityTokenRequest#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenRequest integrityTokenRequest)` | `PlayAsyncOperation< https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityTokenResponse#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenResponse, https://developer.android.com/reference/unity/namespace/Google/Play/Integrity#namespaceGoogle_1_1Play_1_1Integrity_1a7df9f11cac69ea066240452ce7300b63 >` Starts a PlayAsyncOperation to generate a token for integrity-related enquiries, and provides the token as its result. |

## Public functions

### IntegrityManager

```c#
 IntegrityManager()
```
Constructor.

### RequestIntegrityToken

```c#
PlayAsyncOperation< IntegrityTokenResponse, IntegrityErrorCode > RequestIntegrityToken(
  IntegrityTokenRequest integrityTokenRequest
)
```
Starts a PlayAsyncOperation to generate a token for integrity-related enquiries, and provides the token as its result.

<br />

| Details ||
|---|---|
| **Returns** | A PlayAsyncOperation{IntegrityTokenResponse, IntegrityErrorCode} that returns [IntegrityTokenResponse](https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityTokenResponse#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenResponse) on successful callback or [IntegrityErrorCode](https://developer.android.com/reference/unity/namespace/Google/Play/Integrity#namespaceGoogle_1_1Play_1_1Integrity_1a7df9f11cac69ea066240452ce7300b63) on failure callback. |

DEPRECATED: Please use [IntegrityManagerV2.RequestIntegrityToken(IntegrityTokenRequest)](https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityManagerV2#classGoogle_1_1Play_1_1Integrity_1_1IntegrityManagerV2_1a255ccbe50c81fcbd260e29d0a143b946) instead.

The JSON payload is signed and encrypted as a nested JSON Web Token (JWT), that is [JWE](https://tools.ietf.org/html/rfc7516) of [JWS](https://tools.ietf.org/html/rfc7515).

JWE uses [A256KW](https://tools.ietf.org/html/rfc7518#section-4.4) as a key wrapping algorithm and [A256GCM](https://tools.ietf.org/html/rfc7518#section-5.3) as a content encryption algorithm. JWS uses [ES256](https://tools.ietf.org/html/rfc7518#section-3.4) as a signing algorithm.

All decryption and verification should be done within a secure server environment. Do not decrypt or verify the received token from within the client app. In particular, never expose any decryption keys to the client app.

See <https://developer.android.com/google/play/integrity/classic#token-format>.