# 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)

*** ** * ** ***

<br />

```
class TrackOutput.CryptoData
```

<br />

*** ** * ** ***

Holds data required to decrypt a sample.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#CryptoData(int,byte[],int,int)( @https://developer.android.com/reference/kotlin/androidx/media3/common/C.CryptoMode cryptoMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, encryptionKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!, encryptedBlocks: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, clearBlocks: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#hashCode()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#clearBlocks()` The number of clear blocks in the encryption pattern, 0 if pattern encryption does not apply. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.CryptoMode https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#cryptoMode()` The encryption mode used for the sample. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#encryptedBlocks()` The number of encrypted blocks in the encryption pattern, 0 if pattern encryption does not apply. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#encryptionKey()` The encryption key associated with the sample. |

## Public constructors

### CryptoData

```
CryptoData(
    @C.CryptoMode cryptoMode: Int,
    encryptionKey: ByteArray<Byte>!,
    encryptedBlocks: Int,
    clearBlocks: Int
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.CryptoMode cryptoMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#cryptoMode()`. |
| `encryptionKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | See `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#encryptionKey()`. |
| `encryptedBlocks: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#encryptedBlocks()`. |
| `clearBlocks: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData#clearBlocks()`. |

## Public functions

### equals

```
fun equals(obj: Any?): Boolean
```

### hashCode

```
fun hashCode(): Int
```

## Public properties

### clearBlocks

```
val clearBlocks: Int
```

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

### cryptoMode

```
@C.CryptoMode
val cryptoMode: Int
```

The encryption mode used for the sample.

### encryptedBlocks

```
val encryptedBlocks: Int
```

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

### encryptionKey

```
val encryptionKey: Array<Byte>!
```

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