|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanon.crypto.MyAES
public class MyAES
This class is a wrapper for doing AES encryption stuff.
| Field Summary | |
|---|---|
private org.bouncycastle.crypto.engines.AESFastEngine |
m_AES
Stores the used AES encryption algorithm. |
private byte[] |
m_arCounter
Same variables for CTR mode |
private byte[] |
m_arCounterOut
|
private int |
m_posCTR
|
| Constructor Summary | |
|---|---|
MyAES()
Creates a new instance of Aes. |
|
| Method Summary | |
|---|---|
void |
init(boolean bEncrypt,
byte[] a_aesKey)
Initialises instance of Aes for encryption or decryption. |
void |
init(boolean bEncrypt,
byte[] a_aesKey,
int off,
int len)
Initialises instance of Aes for encryption or decryption. |
byte[] |
processBlockECB(byte[] a_plainData)
Encrypts/Decrypts one single plain data block and returns the cipher data block. |
void |
processBlockECB(byte[] a_InData,
byte[] a_OutData)
Encrypts/Decrypts one single plain data block and returns the cipher data block. |
void |
processBytesCTR(byte[] in,
int inOff,
byte[] out,
int outOff,
int len)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.bouncycastle.crypto.engines.AESFastEngine m_AES
private byte[] m_arCounter
private byte[] m_arCounterOut
private int m_posCTR
| Constructor Detail |
|---|
public MyAES()
| Method Detail |
|---|
public void init(boolean bEncrypt,
byte[] a_aesKey)
throws java.lang.Exception
a_aesKey - The 128 bit or 192 bit or 256 bit AES key.
java.lang.Exception
public void init(boolean bEncrypt,
byte[] a_aesKey,
int off,
int len)
throws java.lang.Exception
a_aesKey - The 128 bit or 192 bit or 256 bit AES key.
java.lang.Exception
public void processBlockECB(byte[] a_InData,
byte[] a_OutData)
throws java.lang.Exception
a_plainData - The plain data block.
java.lang.Exception
public byte[] processBlockECB(byte[] a_plainData)
throws java.lang.Exception
a_plainData - The plain data block.
java.lang.Exception
public void processBytesCTR(byte[] in,
int inOff,
byte[] out,
int outOff,
int len)
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||