| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private byte[] | |
| private int | |
| private CTRModeCipher | |
| private boolean | |
| private static final byte | |
| private boolean | |
| private static final byte | |
| private byte[] | |
| private Mac | |
| private byte[] | |
| private int | |
| private byte[] | |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| public | EAXBlockCipher(BlockCipher
the engine to use cipher)Constructor that accepts an instance of a block cipher engine. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public int | doFinal(byte[]
space for any resulting output data. out, int offset into out to start copying the data at. outOff)Implements org. Finish the operation either appending or verifying the MAC at the end of the data. |
| public String | getAlgorithmName()
Implements org. Return the name of the algorithm. |
| public int | |
| public byte[] | getMac()
Implements org. Return the value of the MAC associated with the last stream processed. |
| public int | getOutputSize(int
the length of the input. len)Implements org. return the size of the output buffer required for a processBytes plus a doFinal with an input of len bytes. |
| public BlockCipher | getUnderlyingCipher()
Implements org. return the |
| public int | getUpdateOutputSize(int
the length of the input. len)Implements org. return the size of the output buffer required for a processBytes an input of len bytes. |
| public void | init(boolean
true if we are setting up for encryption, false otherwise. forEncryption, CipherParameters the necessary parameters for the underlying cipher to be initialised. params)Implements org. initialise the underlying cipher. |
| private void | |
| private int | |
| public void | processAADByte(byte
the byte to be processed. in)Implements org. Add a single byte to the associated data check. |
| public void | processAADBytes(byte[]
the input byte array. in, int the offset into the in array where the data to be processed starts. inOff, int the number of bytes to be processed. len)Implements org. Add a sequence of bytes to the associated data check. |
| public int | processByte(byte
the byte to be processed. in, byte[] the output buffer the processed byte goes into. out, int the offset into the output byte array the processed data starts at. outOff)Implements org. encrypt/decrypt a single byte. |
| public int | processBytes(byte[]
the input byte array. in, int the offset into the in array where the data to be processed starts. inOff, int the number of bytes to be processed. len, byte[] the output buffer the processed bytes go into. out, int the offset into the output byte array the processed data starts at. outOff)Implements org. process a block of bytes from in putting the result into out. |
| public void | |
| private void | |
| private boolean |
| associatedTextMac | back to summary |
|---|---|
| private byte[] associatedTextMac | |
| blockSize | back to summary |
|---|---|
| private int blockSize | |
| bufBlock | back to summary |
|---|---|
| private byte[] bufBlock | |
| bufOff | back to summary |
|---|---|
| private int bufOff | |
| cipher | back to summary |
|---|---|
| private CTRModeCipher cipher | |
| cipherInitialized | back to summary |
|---|---|
| private boolean cipherInitialized | |
| cTAG | back to summary |
|---|---|
| private static final byte cTAG | |
| forEncryption | back to summary |
|---|---|
| private boolean forEncryption | |
| hTAG | back to summary |
|---|---|
| private static final byte hTAG | |
| initialAssociatedText | back to summary |
|---|---|
| private byte[] initialAssociatedText | |
| mac | back to summary |
|---|---|
| private Mac mac | |
| macBlock | back to summary |
|---|---|
| private byte[] macBlock | |
| macSize | back to summary |
|---|---|
| private int macSize | |
| nonceMac | back to summary |
|---|---|
| private byte[] nonceMac | |
| nTAG | back to summary |
|---|---|
| private static final byte nTAG | |
| EAXBlockCipher | back to summary |
|---|---|
| public EAXBlockCipher(BlockCipher cipher) Constructor that accepts an instance of a block cipher engine.
| |
| calculateMac | back to summary |
|---|---|
| private void calculateMac() | |
| doFinal | back to summary |
|---|---|
| public int doFinal(byte[] out, int outOff) throws IllegalStateException, InvalidCipherTextException Implements org. Doc from org. Finish the operation either appending or verifying the MAC at the end of the data.
| |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. Return the name of the algorithm.
| |
| getBlockSize | back to summary |
|---|---|
| public int getBlockSize() | |
| getMac | back to summary |
|---|---|
| public byte[] getMac() Implements org. Doc from org. Return the value of the MAC associated with the last stream processed.
| |
| getOutputSize | back to summary |
|---|---|
| public int getOutputSize(int len) Implements org. Doc from org. return the size of the output buffer required for a processBytes plus a doFinal with an input of len bytes.
The returned size may be dependent on the initialisation of this cipher
and may not be accurate once subsequent input data is processed - this method
should be invoked immediately prior to a call to final processing of input data
and a call to
| |
| getUnderlyingCipher | back to summary |
|---|---|
| public BlockCipher getUnderlyingCipher() Implements org. Doc from org. return the
| |
| getUpdateOutputSize | back to summary |
|---|---|
| public int getUpdateOutputSize(int len) Implements org. Doc from org. return the size of the output buffer required for a processBytes an input of len bytes. The returned size may be dependent on the initialisation of this cipher and may not be accurate once subsequent input data is processed - this method should be invoked immediately prior to input data being processed.
| |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters params) throws IllegalArgumentException Implements org. Doc from org. initialise the underlying cipher. Parameter can either be an AEADParameters or a ParametersWithIV object.
| |
| initCipher | back to summary |
|---|---|
| private void initCipher() | |
| process | back to summary |
|---|---|
| private int process(byte b, byte[] out, int outOff) | |
| processAADByte | back to summary |
|---|---|
| public void processAADByte(byte in) Implements org. Doc from org. Add a single byte to the associated data check.
| |
| processAADBytes | back to summary |
|---|---|
| public void processAADBytes(byte[] in, int inOff, int len) Implements org. Doc from org. Add a sequence of bytes to the associated data check.
| |
| processByte | back to summary |
|---|---|
| public int processByte(byte in, byte[] out, int outOff) throws DataLengthException Implements org. Doc from org. encrypt/decrypt a single byte.
| |
| processBytes | back to summary |
|---|---|
| public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException Implements org. Doc from org. process a block of bytes from in putting the result into out.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. Reset the cipher. After resetting the cipher is in the same state as it was after the last init (if there was one). | |
| reset | back to summary |
|---|---|
| private void reset(boolean clearMac) | |
| verifyMac | back to summary |
|---|---|
| private boolean verifyMac(byte[] mac, int off) | |