|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.crypto.AESEngine
net.i2p.crypto.CryptixAESEngine
public class CryptixAESEngine
Wrapper for AES cypher operation using Cryptix's Rijndael implementation. Implements CBC with a 16 byte IV. Problems: Only supports data of size mod 16 bytes - no inherent padding.
Constructor Summary | |
---|---|
CryptixAESEngine(I2PAppContext context)
|
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)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class net.i2p.crypto.AESEngine |
---|
safeDecrypt, safeEncrypt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CryptixAESEngine(I2PAppContext context)
Method Detail |
---|
public void encrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int length)
AESEngine
encrypt
in class AESEngine
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 encryptpublic void encrypt(byte[] payload, int payloadIndex, byte[] out, int outIndex, SessionKey sessionKey, byte[] iv, int ivOffset, int length)
AESEngine
encrypt
in class AESEngine
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 encryptpublic 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
public final void decryptBlock(byte[] payload, int inIndex, SessionKey sessionKey, byte[] rv, int outIndex)
decryptBlock
in class AESEngine
payload
- encrypted datasessionKey
- private session keypublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |