| org.bouncycastle.crypto.modes.AEADBlockCipher
All known Subclasses: org.bouncycastle.crypto.modes.CCMBlockCipher, org.bouncycastle.crypto.modes.EAXBlockCipher,
Method Summary | |
public int | doFinal(byte[] out, int outOff) Finish the operation either appending or verifying the MAC at the end of the data.
Parameters: out - space for any resulting output data. Parameters: outOff - offset into out to start copying the data at. | public String | getAlgorithmName() Return the name of the algorithm. | public byte[] | getMac() Return the value of the MAC associated with the last stream processed. | public int | getOutputSize(int len) return the size of the output buffer required for a processBytes plus a
doFinal with an input of len bytes.
Parameters: len - the length of the input. | public BlockCipher | getUnderlyingCipher() return the cipher this object wraps. | public int | getUpdateOutputSize(int len) return the size of the output buffer required for a processBytes
an input of len bytes.
Parameters: len - the length of the input. | public void | init(boolean forEncryption, CipherParameters params) initialise the underlying cipher. | public int | processByte(byte in, byte[] out, int outOff) encrypt/decrypt a single byte.
Parameters: in - the byte to be processed. Parameters: out - the output buffer the processed byte goes into. Parameters: outOff - the offset into the output byte array the processed data starts at. | public int | processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) process a block of bytes from in putting the result into out.
Parameters: in - the input byte array. Parameters: inOff - the offset into the in array where the data to be processed starts. Parameters: len - the number of bytes to be processed. Parameters: out - the output buffer the processed bytes go into. Parameters: outOff - the offset into the output byte array the processed data starts at. | public void | reset() Reset the cipher. |
getAlgorithmName | public String getAlgorithmName()(Code) | | Return the name of the algorithm.
the algorithm name. |
getMac | public byte[] getMac()(Code) | | Return the value of the MAC associated with the last stream processed.
MAC for plaintext data. |
getOutputSize | public int getOutputSize(int len)(Code) | | return the size of the output buffer required for a processBytes plus a
doFinal with an input of len bytes.
Parameters: len - the length of the input. the space required to accommodate a call to processBytes and doFinalwith len bytes of input. |
getUnderlyingCipher | public BlockCipher getUnderlyingCipher()(Code) | | return the cipher this object wraps.
the cipher this object wraps. |
getUpdateOutputSize | public int getUpdateOutputSize(int len)(Code) | | return the size of the output buffer required for a processBytes
an input of len bytes.
Parameters: len - the length of the input. the space required to accommodate a call to processByteswith len bytes of input. |
init | public void init(boolean forEncryption, CipherParameters params) throws IllegalArgumentException(Code) | | initialise the underlying cipher. Parameter can either be an AEADParameters or a ParametersWithIV object.
Parameters: forEncryption - true if we are setting up for encryption, false otherwise. Parameters: params - the necessary parameters for the underlying cipher to be initialised. exception: IllegalArgumentException - if the params argument is inappropriate. |
processByte | public int processByte(byte in, byte[] out, int outOff) throws DataLengthException(Code) | | encrypt/decrypt a single byte.
Parameters: in - the byte to be processed. Parameters: out - the output buffer the processed byte goes into. Parameters: outOff - the offset into the output byte array the processed data starts at. the number of bytes written to out. exception: DataLengthException - if the output buffer is too small. |
processBytes | public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException(Code) | | process a block of bytes from in putting the result into out.
Parameters: in - the input byte array. Parameters: inOff - the offset into the in array where the data to be processed starts. Parameters: len - the number of bytes to be processed. Parameters: out - the output buffer the processed bytes go into. Parameters: outOff - the offset into the output byte array the processed data starts at. the number of bytes written to out. exception: DataLengthException - if the output buffer is too small. |
reset | public void reset()(Code) | | Reset the cipher. After resetting the cipher is in the same state
as it was after the last init (if there was one).
|
|
|