public final class CryptixAESEngine extends AESEngine
| Constructor and Description |
|---|
CryptixAESEngine(I2PAppContext context) |
| 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 |
getPadding, getPaddingSize, safeDecrypt, safeEncryptpublic CryptixAESEngine(I2PAppContext context)
public void decrypt(byte[] payload,
int payloadIndex,
byte[] out,
int outIndex,
SessionKey sessionKey,
byte[] iv,
int length)AESEnginedecrypt in class AESEngineiv - 16 byteslength - must be a multiple of 16 (will overrun to next mod 16 if not)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 topublic void decrypt(byte[] payload,
int payloadIndex,
byte[] out,
int outIndex,
SessionKey sessionKey,
byte[] iv,
int ivOffset,
int length)AESEnginedecrypt in class AESEngineiv - 16 bytes starting at ivOffsetlength - must be a multiple of 16 (will overrun to next mod 16 if not)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 toivOffset - offset into IVpublic final void decryptBlock(byte[] payload,
int inIndex,
SessionKey sessionKey,
byte[] rv,
int outIndex)decryptBlock in class AESEnginepayload - encrypted data, 16 bytes starting at inIndexsessionKey - private session keyrv - out parameter, 16 bytes starting at outIndexinIndex - starting index in payloadoutIndex - starting index in outputpublic void encrypt(byte[] payload,
int payloadIndex,
byte[] out,
int outIndex,
SessionKey sessionKey,
byte[] iv,
int length)AESEngineencrypt in class AESEngineiv - must be 16 byteslength - must be a multiple of 16payload - 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 topublic void encrypt(byte[] payload,
int payloadIndex,
byte[] out,
int outIndex,
SessionKey sessionKey,
byte[] iv,
int ivOffset,
int length)AESEngineencrypt in class AESEngineiv - must be 16 byteslength - must be a multiple of 16payload - data to be encryptedpayloadIndex - index into payload to start encryptingout - where to store resultoutIndex - where in out to start writingsessionKey - private session key to encrypt toivOffset - offset into IVpublic final void encryptBlock(byte[] payload,
int inIndex,
SessionKey sessionKey,
byte[] out,
int outIndex)encryptBlock in class AESEnginepayload - plaintext data, 16 bytes starting at inIndexsessionKey - private session keyout - out parameter, 16 bytes starting at outIndexinIndex - starting index in payloadoutIndex - starting index in output