# EncryptedFile.FileEncryptionScheme

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/EncryptedFile.java+class:androidx.security.crypto.EncryptedFile.FileEncryptionScheme) 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)

*** ** * ** ***


```
public enum EncryptedFile.FileEncryptionScheme
```

<br />

*** ** * ** ***

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

The encryption scheme to encrypt files.

## Summary

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

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

## Enum Values

### AES256_GCM_HKDF_4KB

```
EncryptedFile.FileEncryptionScheme EncryptedFile.FileEncryptionScheme.AES256_GCM_HKDF_4KB
```

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

The file content is encrypted using StreamingAead with AES-GCM, with the file name as associated data.

For more information please see the Tink documentation:

[AesGcmHkdfStreamingKeyManager](https://google.github.io/tink/javadoc/tink/1.7.0/com/google/crypto/tink/streamingaead/AesGcmHkdfStreamingKeyManager.html).aes256GcmHkdf4KBTemplate()

## Public methods

### valueOf

Added in 1.0.0 Deprecated in 1.1.0

```
public static EncryptedFile.FileEncryptionScheme [valueOf](https://developer.android.com/reference/androidx/security/crypto/EncryptedFile.FileEncryptionScheme#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/EncryptedFile.FileEncryptionScheme` | 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

```
public static EncryptedFile.FileEncryptionScheme[] [values](https://developer.android.com/reference/androidx/security/crypto/EncryptedFile.FileEncryptionScheme#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 |
|---|---|
| `EncryptedFile.FileEncryptionScheme[]` | an array containing the constants of this enum type, in the order they're declared |