public class AESGCMPacketCipher extends java.lang.Object implements AESGCMModePacketCipher
Constructor and Description |
---|
AESGCMPacketCipher() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
int |
getOutputSize(boolean forEncryption,
CipherParameters parameters,
int len)
Returns the expected output size for direction and parameters.
|
protected static void |
initMultiplier(long[][] t,
byte[] h) |
boolean |
isDestroyed() |
static AESGCMModePacketCipher |
newInstance() |
int |
processPacket(boolean encryption,
CipherParameters parameters,
byte[] input,
int inOff,
int len,
byte[] output,
int outOff)
Process a packet.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkParameters
public static AESGCMModePacketCipher newInstance()
public int getOutputSize(boolean forEncryption, CipherParameters parameters, int len)
PacketCipher
getOutputSize
in interface PacketCipher
forEncryption
- encryption if trueparameters
- The cipher parameterslen
- the input length.public int processPacket(boolean encryption, CipherParameters parameters, byte[] input, int inOff, int len, byte[] output, int outOff) throws PacketCipherException
PacketCipher
processPacket
in interface PacketCipher
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.protected static void initMultiplier(long[][] t, byte[] h)
public java.lang.String toString()
toString
in class java.lang.Object
public void destroy() throws javax.security.auth.DestroyFailedException
destroy
in interface javax.security.auth.Destroyable
javax.security.auth.DestroyFailedException
public boolean isDestroyed()
isDestroyed
in interface javax.security.auth.Destroyable