public final class CryptixAESEngine extends AESEngine
| Constructor | Description |
|---|---|
CryptixAESEngine(I2PAppContext context) |
| Modifier and Type | Method | 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 the payload with the session key.
|
void |
encryptBlock(byte[] payload,
int inIndex,
SessionKey sessionKey,
byte[] out,
int outIndex) |
encrypt exactly 16 bytes using the session key
|
safeDecrypt, safeEncryptpublic CryptixAESEngine(I2PAppContext context)
public 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 the payload to start encryptingout - where to store the resultoutIndex - where in out to start writingsessionKey - private esession key to encrypt topublic 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 topublic 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 outIndexpublic 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 outIndex