net.i2p.crypto
public 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 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, safeEncrypt
public CryptixAESEngine(I2PAppContext context)
public void encrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int length)
AESEngine
encrypt
in class AESEngine
length
- 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 toiv
- IV for CBCpublic void encrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int ivOffset, int length)
AESEngine
encrypt
in class AESEngine
length
- 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 toiv
- IV for CBCpublic void decrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int length)
AESEngine
decrypt
in class AESEngine
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 decryptpublic void decrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int ivOffset, int length)
AESEngine
decrypt
in class AESEngine
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 decryptpublic final void encryptBlock(byte[] payload, int inIndex, SessionKey sessionKey, byte[] out, int outIndex)
encryptBlock
in class AESEngine
sessionKey
- unusedpublic final void decryptBlock(byte[] payload, int inIndex, SessionKey sessionKey, byte[] rv, int outIndex)
decryptBlock
in class AESEngine
payload
- encrypted datasessionKey
- private session key