Package com.google.android.exoplayer2.extractor

## Class TrackOutput.CryptoData

- java.lang.Object
- - com.google.android.exoplayer2.extractor.TrackOutput.CryptoData

- Enclosing interface:
    TrackOutput

      public static final class TrackOutput.CryptoData
      extends Object

  Holds data required to decrypt a sample.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `int` | `clearBlocks` | The number of clear blocks in the encryption pattern, 0 if pattern encryption does not apply.
    `int` | `cryptoMode` | The encryption mode used for the sample.
    `int` | `encryptedBlocks` | The number of encrypted blocks in the encryption pattern, 0 if pattern encryption does not apply.
    `byte[]` | `encryptionKey` | The encryption key associated with the sample.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CryptoData​(int cryptoMode, byte[] encryptionKey, int encryptedBlocks, int clearBlocks)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(Object obj)` |
    `int` | `hashCode()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cryptoMode

          @CryptoMode
          public final int cryptoMode

      The encryption mode used for the sample.

    - #### encryptionKey

          public final byte[] encryptionKey

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

    - #### encryptedBlocks

          public final int encryptedBlocks

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

    - #### clearBlocks

          public final int clearBlocks

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

  - ### Constructor Detail

    - #### CryptoData

          public CryptoData​(@CryptoMode
                            int cryptoMode,
                            byte[] encryptionKey,
                            int encryptedBlocks,
                            int clearBlocks)

      Parameters:
        `cryptoMode` - See `cryptoMode`.
        `encryptionKey` - See `encryptionKey`.
        `encryptedBlocks` - See `encryptedBlocks`.
        `clearBlocks` - See `clearBlocks`.

  - ### Method Detail

    - #### equals

          public boolean equals​(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`