net.i2p.router.crypto.ratchet

## Class RatchetPayload.PaddingBlock

- java.lang.Object
- - net.i2p.router.crypto.ratchet.RatchetPayload.Block
  - - net.i2p.router.crypto.ratchet.RatchetPayload.PaddingBlock

- Enclosing class:
    RatchetPayload

      public static class RatchetPayload.PaddingBlock
      extends RatchetPayload.Block

  Padding block for ratchet payload size alignment and obfuscation

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PaddingBlock(I2PAppContext context, int size)` Deprecated.
    `PaddingBlock(int size)` with zero-filled data

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDataLength()`
    `int` | `writeData(byte[] tgt, int off)`

    - ### Methods inherited from class net.i2p.router.crypto.ratchet.RatchetPayload.Block

      `getTotalLength, toString, write`

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

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

- - ### Constructor Detail

    - #### PaddingBlock

          @Deprecated
          public PaddingBlock(I2PAppContext context,
                                          int size)

      Deprecated.
      with random data

    - #### PaddingBlock

          public PaddingBlock(int size)

      with zero-filled data

  - ### Method Detail

    - #### getDataLength

          public int getDataLength()

      Specified by:
        `getDataLength` in class `RatchetPayload.Block`
      Returns:
        the size of the block, NOT including the 3 byte header (type and size)

    - #### writeData

          public int writeData(byte[] tgt,
                               int off)

      Specified by:
        `writeData` in class `RatchetPayload.Block`
      Returns:
        new offset