|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.i2p.crypto.AESEngine
public class AESEngine
Dummy wrapper for AES cipher operation. Warning - most methods UNUSED unless i2p.encryption = off See CryptixAESEngine overrides for the real thing.
| Field Summary | |
|---|---|
protected I2PAppContext |
_context
|
protected Log |
_log
|
| 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)
This just copies payload to rv, see extension for the real thing. |
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)
This just copies payload to out, see extension for the real thing. |
byte[] |
safeDecrypt(byte[] payload,
SessionKey sessionKey,
byte[] iv)
Deprecated. unused |
byte[] |
safeEncrypt(byte[] payload,
SessionKey sessionKey,
byte[] iv,
int paddedSize)
Deprecated. unused |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Log _log
protected final I2PAppContext _context
| Constructor Detail |
|---|
public AESEngine(I2PAppContext ctx)
| Method Detail |
|---|
public void encrypt(byte[] payload,
int payloadIndex,
byte[] out,
int outIndex,
SessionKey sessionKey,
byte[] iv,
int length)
payload - data to be encryptedpayloadIndex - index into the payload to start encryptingout - where to store the resultoutIndex - where in out to start writingsessionKey - private esession key to encrypt toiv - IV for CBC, must be 16 byteslength - how much data to encrypt
public void encrypt(byte[] payload,
int payloadIndex,
byte[] out,
int outIndex,
SessionKey sessionKey,
byte[] iv,
int ivOffset,
int length)
payload - data to be encryptedpayloadIndex - index into the payload to start encryptingout - where to store the resultoutIndex - where in out to start writingsessionKey - private esession key to encrypt toiv - IV for CBClength - how much data to encrypt
public byte[] safeEncrypt(byte[] payload,
SessionKey sessionKey,
byte[] iv,
int paddedSize)
paddedSize - minimum size of the outputiv - IV for CBC, must be 16 bytes
public byte[] safeDecrypt(byte[] payload,
SessionKey sessionKey,
byte[] iv)
iv - IV for CBC, must be 16 bytes
public void decrypt(byte[] payload,
int payloadIndex,
byte[] out,
int outIndex,
SessionKey sessionKey,
byte[] iv,
int length)
payload - data to be decryptedpayloadIndex - index into the payload to start decryptingout - where to store the cleartextoutIndex - where in out to start writingsessionKey - private session key to decrypt toiv - IV for CBClength - how much data to decrypt
public void decrypt(byte[] payload,
int payloadIndex,
byte[] out,
int outIndex,
SessionKey sessionKey,
byte[] iv,
int ivOffset,
int length)
payload - data to be decryptedpayloadIndex - index into the payload to start decryptingout - where to store the cleartextoutIndex - where in out to start writingsessionKey - private session key to decrypt toiv - IV for CBClength - how much data to decrypt
public void encryptBlock(byte[] payload,
int inIndex,
SessionKey sessionKey,
byte[] out,
int outIndex)
sessionKey - unused
public void decryptBlock(byte[] payload,
int inIndex,
SessionKey sessionKey,
byte[] rv,
int outIndex)
payload - encrypted datasessionKey - private session key
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||