public interface TlsBlockCipherImpl
Modifier and Type | Method and Description |
---|---|
int |
doFinal(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
Perform the cipher encryption/decryption returning the output in output.
|
int |
getBlockSize()
Return the blocksize (in bytes) of the underlying block cipher.
|
void |
init(byte[] iv)
Initialise the parameters for operator.
|
void |
setKey(byte[] key)
Set the key to be used by the block cipher implementation supporting this service.
|
void setKey(byte[] key) throws java.io.IOException
key
- the block cipher key.java.io.IOException
void init(byte[] iv) throws java.io.IOException
iv
- the initialization vector.java.io.IOException
- if the parameters are inappropriate.int doFinal(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) throws java.io.IOException
Note: we have to use doFinal() here as it is the only way to guarantee output from the underlying cipher.
input
- array holding input data to the cipher.inputOffset
- offset into input array data starts at.inputLength
- length of the input data in the array.output
- array to hold the cipher output.outputOffset
- offset into output array to start saving output.java.io.IOException
- in case of failure.int getBlockSize()