# MasterKey.KeyScheme

Artifact: [androidx.security:security-crypto](https://developer.android.com/jetpack/androidx/releases/security) [View Source](https://cs.android.com/search?q=file:androidx/security/crypto/MasterKey.java+class:androidx.security.crypto.MasterKey.KeyScheme) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

*** ** * ** ***


```
public enum MasterKey.KeyScheme
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This enum is deprecated.**   
>
> Use `https://docs.oracle.com/javase/8/docs/api/javax/crypto/KeyGenerator.html` with AndroidKeyStore instance instead.

Algorithm/Cipher choices used for the master key.

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/androidx/security/crypto/MasterKey.KeyScheme#AES256_GCM` | **This enum value is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/security/crypto/MasterKey.KeyScheme` | `[valueOf](https://developer.android.com/reference/androidx/security/crypto/MasterKey.KeyScheme#valueOf(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)` **This method is deprecated.** Deprecated in Java |
| `static MasterKey.KeyScheme[]` | `[values](https://developer.android.com/reference/androidx/security/crypto/MasterKey.KeyScheme#values())()` **This method is deprecated.** Deprecated in Java |

## Enum Values

### AES256_GCM

```
MasterKey.KeyScheme MasterKey.KeyScheme.AES256_GCM
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Deprecated in Java

## Public methods

### valueOf

Added in 1.1.0 Deprecated in 1.1.0

```
public static MasterKey.KeyScheme [valueOf](https://developer.android.com/reference/androidx/security/crypto/MasterKey.KeyScheme#valueOf(java.lang.String))(String name)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/security/crypto/MasterKey.KeyScheme` | the enum constant with the specified name |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if this enum type has no constant with the specified name |

### values

Added in 1.1.0 Deprecated in 1.1.0

```
public static MasterKey.KeyScheme[] [values](https://developer.android.com/reference/androidx/security/crypto/MasterKey.KeyScheme#values())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

| Returns |
|---|---|
| `MasterKey.KeyScheme[]` | an array containing the constants of this enum type, in the order they're declared |