# EncryptedSharedPreferences.PrefValueEncryptionScheme

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/EncryptedSharedPreferences.java+class:androidx.security.crypto.EncryptedSharedPreferences.PrefValueEncryptionScheme) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/security#1.0.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

*** ** * ** ***


```
enum EncryptedSharedPreferences.PrefValueEncryptionScheme
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This enum is deprecated.**   
>
> Use `https://developer.android.com/reference/android/content/SharedPreferences.html` instead.

The encryption scheme to encrypt values.

## Summary

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

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/security/crypto/EncryptedSharedPreferences.PrefValueEncryptionScheme!` | `[valueOf](https://developer.android.com/reference/kotlin/androidx/security/crypto/EncryptedSharedPreferences.PrefValueEncryptionScheme#valueOf(java.lang.String))(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` **This function is deprecated.** Deprecated in Java |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/security/crypto/EncryptedSharedPreferences.PrefValueEncryptionScheme!>!` | `[values](https://developer.android.com/reference/kotlin/androidx/security/crypto/EncryptedSharedPreferences.PrefValueEncryptionScheme#values())()` **This function is deprecated.** Deprecated in Java |

## Enum Values

### AES256_GCM

```
val EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM: EncryptedSharedPreferences.PrefValueEncryptionScheme
```

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

Pref values are encrypted with AES256-GCM. The associated data is the encrypted pref key.

For more information please see the Tink documentation:

[AesGcmKeyManager](https://google.github.io/tink/javadoc/tink/1.7.0/com/google/crypto/tink/aead/AesGcmKeyManager.html).aes256GcmTemplate()

## Public functions

### valueOf

Added in 1.0.0 Deprecated in 1.1.0

```
java-static fun [valueOf](https://developer.android.com/reference/kotlin/androidx/security/crypto/EncryptedSharedPreferences.PrefValueEncryptionScheme#valueOf(java.lang.String))(name: String!): EncryptedSharedPreferences.PrefValueEncryptionScheme!
```

> [!CAUTION]
> **This function 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/kotlin/androidx/security/crypto/EncryptedSharedPreferences.PrefValueEncryptionScheme!` | 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.0.0 Deprecated in 1.1.0

```
java-static fun [values](https://developer.android.com/reference/kotlin/androidx/security/crypto/EncryptedSharedPreferences.PrefValueEncryptionScheme#values())(): Array<EncryptedSharedPreferences.PrefValueEncryptionScheme!>!
```

> [!CAUTION]
> **This function 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 |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/security/crypto/EncryptedSharedPreferences.PrefValueEncryptionScheme!>!` | an array containing the constants of this enum type, in the order they're declared |