net.i2p.crypto

## Class CryptixAESEngine

- java.lang.Object
- - net.i2p.crypto.AESEngine
  - - net.i2p.crypto.CryptixAESEngine

-     public final class CryptixAESEngine
      extends AESEngine

  AES encryption engine using Cryptix's Rijndael implementation with CBC mode. Supports 128-bit block size with 16-byte IV. No padding is provided.

- - ### Field Summary

    - ### Fields inherited from class net.i2p.crypto.AESEngine

      `_context, _log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CryptixAESEngine(I2PAppContext context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `decrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int length)` Decrypt the data with the session key
    `void` | `decrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int ivOffset, int length)` Decrypt the data with the session key.
    `void` | `decryptBlock(byte[] payload, int inIndex, SessionKey sessionKey, byte[] rv, int outIndex)` decrypt exactly 16 bytes of data with the session key provided
    `void` | `encrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int length)` Encrypt the payload with the session key
    `void` | `encrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int ivOffset, int length)` Encrypt payload with session key.
    `void` | `encryptBlock(byte[] payload, int inIndex, SessionKey sessionKey, byte[] out, int outIndex)` encrypt exactly 16 bytes using the session key

    - ### Methods inherited from class net.i2p.crypto.AESEngine

      `getPadding, getPaddingSize`

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

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

- - ### Constructor Detail

    - #### CryptixAESEngine

          public CryptixAESEngine(I2PAppContext context)

  - ### Method Detail

    - #### decrypt

          public void decrypt(byte[] payload,
                              int payloadIndex,
                              byte[] out,
                              int outIndex,
                              SessionKey sessionKey,
                              byte[] iv,
                              int length)

      Description copied from class: `AESEngine`
      Decrypt the data with the session key
      Overrides:
        `decrypt` in class `AESEngine`
      Parameters:
        `iv` - 16 bytes
        `length` - must be a multiple of 16 (will overrun to next mod 16 if not)
        `payload` - data to be decrypted
        `payloadIndex` - index into the payload to start decrypting
        `out` - where to store the cleartext
        `outIndex` - where in out to start writing
        `sessionKey` - private session key to decrypt to

    - #### decrypt

          public void decrypt(byte[] payload,
                              int payloadIndex,
                              byte[] out,
                              int outIndex,
                              SessionKey sessionKey,
                              byte[] iv,
                              int ivOffset,
                              int length)

      Description copied from class: `AESEngine`
      Decrypt the data with the session key. This just copies payload to out, see extension for the real thing.
      Overrides:
        `decrypt` in class `AESEngine`
      Parameters:
        `iv` - 16 bytes starting at ivOffset
        `length` - must be a multiple of 16 (will overrun to next mod 16 if not)
        `payload` - data to be decrypted
        `payloadIndex` - index into the payload to start decrypting
        `out` - where to store the cleartext
        `outIndex` - where in out to start writing
        `sessionKey` - private session key to decrypt to
        `ivOffset` - offset into IV

    - #### decryptBlock

          public final void decryptBlock(byte[] payload,
                                         int inIndex,
                                         SessionKey sessionKey,
                                         byte[] rv,
                                         int outIndex)

      decrypt exactly 16 bytes of data with the session key provided
      Overrides:
        `decryptBlock` in class `AESEngine`
      Parameters:
        `payload` - encrypted data, 16 bytes starting at inIndex
        `sessionKey` - private session key
        `rv` - out parameter, 16 bytes starting at outIndex
        `inIndex` - starting index in payload
        `outIndex` - starting index in output

    - #### encrypt

          public void encrypt(byte[] payload,
                              int payloadIndex,
                              byte[] out,
                              int outIndex,
                              SessionKey sessionKey,
                              byte[] iv,
                              int length)

      Description copied from class: `AESEngine`
      Encrypt the payload with the session key
      Overrides:
        `encrypt` in class `AESEngine`
      Parameters:
        `iv` - must be 16 bytes
        `length` - must be a multiple of 16
        `payload` - data to be encrypted
        `payloadIndex` - index into the payload to start encrypting
        `out` - where to store the result
        `outIndex` - where in out to start writing
        `sessionKey` - private esession key to encrypt to

    - #### encrypt

          public void encrypt(byte[] payload,
                              int payloadIndex,
                              byte[] out,
                              int outIndex,
                              SessionKey sessionKey,
                              byte[] iv,
                              int ivOffset,
                              int length)

      Description copied from class: `AESEngine`
      Encrypt payload with session key. This just copies payload to out, see extension for the real thing.
      Overrides:
        `encrypt` in class `AESEngine`
      Parameters:
        `iv` - must be 16 bytes
        `length` - must be a multiple of 16
        `payload` - data to be encrypted
        `payloadIndex` - index into payload to start encrypting
        `out` - where to store result
        `outIndex` - where in out to start writing
        `sessionKey` - private session key to encrypt to
        `ivOffset` - offset into IV

    - #### encryptBlock

          public final void encryptBlock(byte[] payload,
                                         int inIndex,
                                         SessionKey sessionKey,
                                         byte[] out,
                                         int outIndex)

      encrypt exactly 16 bytes using the session key
      Overrides:
        `encryptBlock` in class `AESEngine`
      Parameters:
        `payload` - plaintext data, 16 bytes starting at inIndex
        `sessionKey` - private session key
        `out` - out parameter, 16 bytes starting at outIndex
        `inIndex` - starting index in payload
        `outIndex` - starting index in output