Package org.bouncycastle.crypto.engines
Class AESNativeGCMPacketCipher
java.lang.Object
org.bouncycastle.crypto.engines.AESNativeGCMPacketCipher
- All Implemented Interfaces:
Destroyable,AESGCMModePacketCipher,PacketCipher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()intgetOutputSize(boolean encryption, CipherParameters parameters, int len) Returns the expected output size for direction and parameters.booleanintprocessPacket(boolean encryption, CipherParameters params, byte[] input, int inOff, int len, byte[] output, int outOff) Process a packet.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bouncycastle.crypto.modes.AESGCMModePacketCipher
checkParameters
-
Constructor Details
-
AESNativeGCMPacketCipher
public AESNativeGCMPacketCipher()
-
-
Method Details
-
getOutputSize
Description copied from interface:PacketCipherReturns the expected output size for direction and parameters.- Specified by:
getOutputSizein interfacePacketCipher- Parameters:
encryption- encryption if trueparameters- The cipher parameterslen- the input length.- Returns:
- the required minimum output length in bytes.
-
processPacket
public int processPacket(boolean encryption, CipherParameters params, byte[] input, int inOff, int len, byte[] output, int outOff) throws PacketCipherException Description copied from interface:PacketCipherProcess a packet.- Specified by:
processPacketin interfacePacketCipher- Parameters:
encryption- encryption if trueparams- 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.- Returns:
- Throws:
PacketCipherException- if the transformation encounters an error.
-
toString
-
destroy
- Specified by:
destroyin interfaceDestroyable- Throws:
DestroyFailedException
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-