Package com.google.android.exoplayer2.upstream.crypto

## Class AesFlushingCipher

- java.lang.Object
- - com.google.android.exoplayer2.upstream.crypto.AesFlushingCipher

-     public final class AesFlushingCipher
      extends Object

  A flushing variant of a AES/CTR/NoPadding `Cipher`.

  Unlike a regular `Cipher`, the update methods of this class are guaranteed to process all of the bytes input (and hence output the same number of bytes).

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AesFlushingCipher​(int mode, byte[] secretKey, long nonce, long offset)` |
    `AesFlushingCipher​(int mode, byte[] secretKey, String nonce, long offset)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `update​(byte[] in, int inOffset, int length, byte[] out, int outOffset)` |
    `void` | `updateInPlace​(byte[] data, int offset, int length)` |

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

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

- - ### Constructor Detail

    - #### AesFlushingCipher

          public AesFlushingCipher​(int mode,
                                   byte[] secretKey,
                                   @Nullable
                                   String nonce,
                                   long offset)

    - #### AesFlushingCipher

          public AesFlushingCipher​(int mode,
                                   byte[] secretKey,
                                   long nonce,
                                   long offset)

  - ### Method Detail

    - #### updateInPlace

          public void updateInPlace​(byte[] data,
                                    int offset,
                                    int length)

    - #### update

          public void update​(byte[] in,
                             int inOffset,
                             int length,
                             byte[] out,
                             int outOffset)