public interface PacketCipher
Modifier and Type | Method and Description |
---|---|
int |
getOutputSize(boolean encryption,
CipherParameters parameters,
int len)
Returns the expected output size for direction and parameters.
|
int |
processPacket(boolean encryption,
CipherParameters parameters,
byte[] input,
int inOff,
int len,
byte[] output,
int outOff)
Process a packet.
|
int getOutputSize(boolean encryption, CipherParameters parameters, int len)
encryption
- encryption if trueparameters
- The cipher parameterslen
- the input length.int processPacket(boolean encryption, CipherParameters parameters, byte[] input, int inOff, int len, byte[] output, int outOff) throws PacketCipherException
encryption
- encryption if trueparameters
- The key parametersinput
- The input byte arrayinOff
- Offset within byte array to start reading input.len
- the number of bytes of input to process.output
- The output arrayoutOff
- the offset within the output array to start writing output.PacketCipherException
- if the transformation encounters an error.