Package org.bouncycastle.crypto.modes
Class AESCCMPacketCipher
java.lang.Object
org.bouncycastle.crypto.modes.AESCCMPacketCipher
- All Implemented Interfaces:
AESCCMModePacketCipher,PacketCipher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidctrProcessBlock(byte[] counter, byte[] counterOut, byte[] in, int inOff, byte[] out, int outOff, int[][] workingkeys, byte[] s) intgetOutputSize(boolean encryption, CipherParameters params, int len) Returns the expected output size for direction and parameters.static AESCCMModePacketCipherintprocessPacket(boolean forEncryption, CipherParameters params, byte[] in, int inOff, int inLen, 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.AESCCMModePacketCipher
getCCMMacSize, getMacSize
-
Constructor Details
-
AESCCMPacketCipher
public AESCCMPacketCipher()
-
-
Method Details
-
newInstance
-
getOutputSize
Description copied from interface:PacketCipherReturns the expected output size for direction and parameters.- Specified by:
getOutputSizein interfacePacketCipher- Parameters:
encryption- encryption if trueparams- The cipher parameterslen- the input length.- Returns:
- the required minimum output length in bytes.
-
processPacket
public int processPacket(boolean forEncryption, CipherParameters params, byte[] in, int inOff, int inLen, byte[] output, int outOff) throws PacketCipherException Description copied from interface:PacketCipherProcess a packet.- Specified by:
processPacketin interfacePacketCipher- Parameters:
forEncryption- encryption if trueparams- The key parametersin- The input byte arrayinOff- Offset within byte array to start reading input.inLen- 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.
-
ctrProcessBlock
protected static void ctrProcessBlock(byte[] counter, byte[] counterOut, byte[] in, int inOff, byte[] out, int outOff, int[][] workingkeys, byte[] s) -
toString
-