# TrackOutput.CryptoData

Artifact: [androidx.media3:media3-extractor](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/extractor/TrackOutput.java+class:androidx.media3.extractor.TrackOutput.CryptoData)

*** ** * ** ***


```
public final class TrackOutput.CryptoData
```

<br />

*** ** * ** ***

Holds data required to decrypt a sample.

## Summary

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#clearBlocks()` The number of clear blocks in the encryption pattern, 0 if pattern encryption does not apply. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.CryptoMode https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#cryptoMode()` The encryption mode used for the sample. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#encryptedBlocks()` The number of encrypted blocks in the encryption pattern, 0 if pattern encryption does not apply. |
| `final byte[]` | `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#encryptionKey()` The encryption key associated with the sample. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#CryptoData(int,byte[],int,int)( @https://developer.android.com/reference/androidx/media3/common/C.CryptoMode int cryptoMode, byte[] encryptionKey, int encryptedBlocks, int clearBlocks )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html obj)` |
| `int` | `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#hashCode()()` |

## Public fields

### clearBlocks

```
public final int clearBlocks
```

The number of clear blocks in the encryption pattern, 0 if pattern encryption does not apply.

### cryptoMode

```
@C.CryptoMode
public final int cryptoMode
```

The encryption mode used for the sample.

### encryptedBlocks

```
public final int encryptedBlocks
```

The number of encrypted blocks in the encryption pattern, 0 if pattern encryption does not apply.

### encryptionKey

```
public final byte[] encryptionKey
```

The encryption key associated with the sample. Its contents must not be modified.

## Public constructors

### CryptoData

```
public CryptoData(
    @C.CryptoMode int cryptoMode,
    byte[] encryptionKey,
    int encryptedBlocks,
    int clearBlocks
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.CryptoMode int cryptoMode` | See `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#cryptoMode()`. |
| `byte[] encryptionKey` | See `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#encryptionKey()`. |
| `int encryptedBlocks` | See `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#encryptedBlocks()`. |
| `int clearBlocks` | See `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput.CryptoData#clearBlocks()`. |

## Public methods

### equals

```
public boolean equals(@Nullable Object obj)
```

### hashCode

```
public int hashCode()
```