Top Fields Constructors Methods
org.bouncycastle.crypto.engines

pack-priv abstract Class AEADBaseEngine

extends Object
implements AEADCipher
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.modes.AEADCipher
Known Direct Subclasses
org.bouncycastle.crypto.engines.AEADBufferBaseEngine, org.bouncycastle.crypto.engines.AsconBaseEngine, org.bouncycastle.crypto.engines.ElephantEngine, org.bouncycastle.crypto.engines.Grain128AEADEngine
Imports
org.bouncycastle.crypto.CipherParameters, .CryptoServicesRegistrar, .DataLengthException, org.bouncycastle.crypto.constraints.DefaultServiceProperties, org.bouncycastle.crypto.modes.AEADCipher, org.bouncycastle.crypto.params.AEADParameters, .KeyParameter, .ParametersWithIV

Field Summary

Modifier and TypeField and Description
protected String
protected boolean
protected byte[]
protected int
protected int
protected byte[]
protected int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
getAlgorithmName()

Implements org.bouncycastle.crypto.modes.AEADCipher.getAlgorithmName.

Return the name of the algorithm.

public int
public int
public byte[]
getMac()

Implements org.bouncycastle.crypto.modes.AEADCipher.getMac.

Return the value of the MAC associated with the last stream processed.

public void
init(boolean
true if we are setting up for encryption, false otherwise.
forEncryption
,
CipherParameters
the necessary parameters for the underlying cipher to be initialised.
params
)

Implements org.bouncycastle.crypto.modes.AEADCipher.init.

initialise the underlying cipher.

protected abstract void
init(byte[] key, byte[] iv)

public int
processByte(byte
the byte to be processed.
in
,
byte[]
the output buffer the processed byte goes into.
out
,
int
the offset into the output byte array the processed data starts at.
outOff
)

Implements org.bouncycastle.crypto.modes.AEADCipher.processByte.

encrypt/decrypt a single byte.

public void
protected void
reset(boolean clearMac)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algorithmNameback to summary
protected String algorithmName
forEncryptionback to summary
protected boolean forEncryption
initialAssociatedTextback to summary
protected byte[] initialAssociatedText
IV_SIZEback to summary
protected int IV_SIZE
KEY_SIZEback to summary
protected int KEY_SIZE
macback to summary
protected byte[] mac
MAC_SIZEback to summary
protected int MAC_SIZE

Constructor Detail

AEADBaseEngineback to summary
pack-priv AEADBaseEngine()

Method Detail

getAlgorithmNameback to summary
public String getAlgorithmName()

Implements org.bouncycastle.crypto.modes.AEADCipher.getAlgorithmName.

Doc from org.bouncycastle.crypto.modes.AEADCipher.getAlgorithmName.

Return the name of the algorithm.

Returns:String

the algorithm name.

Annotations
@Override
getIVBytesSizeback to summary
public int getIVBytesSize()
getKeyBytesSizeback to summary
public int getKeyBytesSize()
getMacback to summary
public byte[] getMac()

Implements org.bouncycastle.crypto.modes.AEADCipher.getMac.

Doc from org.bouncycastle.crypto.modes.AEADCipher.getMac.

Return the value of the MAC associated with the last stream processed.

Returns:byte[]

MAC for plaintext data.

initback to summary
public void init(boolean forEncryption, CipherParameters params)

Implements org.bouncycastle.crypto.modes.AEADCipher.init.

Doc from org.bouncycastle.crypto.modes.AEADCipher.init.

initialise the underlying cipher. Parameter can either be an AEADParameters or a ParametersWithIV object.

Parameters
forEncryption:boolean

true if we are setting up for encryption, false otherwise.

params:CipherParameters

the necessary parameters for the underlying cipher to be initialised.

initback to summary
protected abstract void init(byte[] key, byte[] iv)
processByteback to summary
public int processByte(byte in, byte[] out, int outOff) throws DataLengthException

Implements org.bouncycastle.crypto.modes.AEADCipher.processByte.

Doc from org.bouncycastle.crypto.modes.AEADCipher.processByte.

encrypt/decrypt a single byte.

Parameters
in:byte

the byte to be processed.

out:byte[]

the output buffer the processed byte goes into.

outOff:int

the offset into the output byte array the processed data starts at.

Returns:int

the number of bytes written to out.

Exceptions
DataLengthException:
if the output buffer is too small.
resetback to summary
public void reset()

Implements org.bouncycastle.crypto.modes.AEADCipher.reset.

Doc from org.bouncycastle.crypto.modes.AEADCipher.reset.

Reset the cipher. After resetting the cipher is in the same state as it was after the last init (if there was one).

resetback to summary
protected void reset(boolean clearMac)