Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.i2p.crypto
Class AESEngine

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

Direct Known Subclasses:
  CryptixAESEngine

    public class AESEngine

extends Object

Dummy wrapper for AES cipher operation. UNUSED unless i2p.encryption = off See CryptixAESEngine for the real thing.

Constructor Summary
`AESEngine(I2PAppContext ctx)`

Method Summary
`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 the 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 the payload with the session key
`void` | `encryptBlock(byte[] payload, int inIndex, SessionKey sessionKey, byte[] out, int outIndex)` Just copies payload to out
`byte[]` | `safeDecrypt(byte[] payload, SessionKey sessionKey, byte[] iv)`
`byte[]` | `safeEncrypt(byte[] payload, SessionKey sessionKey, byte[] iv, int paddedSize)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AESEngine

    public AESEngine(I2PAppContext ctx)

Method Detail

### encrypt

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

  Encrypt the payload with the session key

  Parameters:
    `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
    `iv` - IV for CBC
    `length` - how much data to encrypt

### encrypt

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

  Encrypt the payload with the session key

  Parameters:
    `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
    `iv` - IV for CBC
    `length` - how much data to encrypt

### safeEncrypt

    public byte[] safeEncrypt(byte[] payload,
                              SessionKey sessionKey,
                              byte[] iv,
                              int paddedSize)

### safeDecrypt

    public byte[] safeDecrypt(byte[] payload,
                              SessionKey sessionKey,
                              byte[] iv)

### decrypt

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

  Decrypt the data with the session key

  Parameters:
    `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
    `iv` - IV for CBC
    `length` - how much data to decrypt

### decrypt

    public 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

  Parameters:
    `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
    `iv` - IV for CBC
    `length` - how much data to decrypt

### encryptBlock

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

  Just copies payload to out

  Parameters:
    `sessionKey` - unused

### decryptBlock

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

  decrypt the data with the session key provided

  Parameters:
    `payload` - encrypted data
    `sessionKey` - private session key

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD