Top Description Fields Constructors Methods
org.bouncycastle.bcpg

public Class AEADEncDataPacket

extends InputStreamPacket
implements AEADAlgorithmTags, BCPGHeaderObject
Class Inheritance
All Implemented Interfaces
org.bouncycastle.bcpg.BCPGHeaderObject, org.bouncycastle.bcpg.AEADAlgorithmTags
Imports
java.io.IOException, org.bouncycastle.util.Arrays

Packet representing non-standard, LibrePGP OCB (AEAD) encrypted data. At the moment this appears to exist in the following expired draft only, but it's appearing despite this. For standardized, interoperable OpenPGP AEAD encrypted data, see SymmetricEncIntegrityPacket of version SymmetricEncIntegrityPacket#VERSION_2.
See Also
LibrePGP - OCB Encrypted Data Packet

Field Summary

Modifier and TypeField and Description
private final byte
private final byte
private final byte
private final byte[]
private final byte
public static final int

Constructor Summary

AccessConstructor and Description
public
public
AEADEncDataPacket(BCPGInputStream in, boolean newPacketFormat)

public
AEADEncDataPacket(int algorithm, int aeadAlgorithm, int chunkSize, byte[] iv)

Method Summary

Modifier and TypeMethod and Description
public static byte[]
createAAData(int version, int symAlgorithm, int aeadAlgorithm, int chunkSize)

public void
public byte[]
public byte
public byte

Returns:

symmetric encryption algorithm
getAlgorithm
()

Return the algorithm-id of the symmetric encryption algorithm used to encrypt the data.

public int
public byte[]
public static int
getIVLength(byte aeadAlgorithm)
Deprecated use AEADUtils.getIVLength()

public int
getType()

Implements org.bouncycastle.bcpg.BCPGHeaderObject.getType.

Return the header type.

public byte
Inherited from org.bouncycastle.bcpg.InputStreamPacket:
getInputStream

Field Detail

aeadAlgorithmback to summary
private final byte aeadAlgorithm
algorithmback to summary
private final byte algorithm
chunkSizeback to summary
private final byte chunkSize
ivback to summary
private final byte[] iv
versionback to summary
private final byte version
VERSION_1back to summary
public static final int VERSION_1

Constructor Detail

AEADEncDataPacketback to summary
public AEADEncDataPacket(BCPGInputStream in) throws IOException
AEADEncDataPacketback to summary
public AEADEncDataPacket(BCPGInputStream in, boolean newPacketFormat) throws IOException
AEADEncDataPacketback to summary
public AEADEncDataPacket(int algorithm, int aeadAlgorithm, int chunkSize, byte[] iv)

Method Detail

createAADataback to summary
public static byte[] createAAData(int version, int symAlgorithm, int aeadAlgorithm, int chunkSize)
encodeback to summary
public void encode(BCPGOutputStream pgOut) throws IOException

Implements org.bouncycastle.bcpg.BCPGHeaderObject.encode.

Annotations
@Override
getAADataback to summary
public byte[] getAAData()
getAEADAlgorithmback to summary
public byte getAEADAlgorithm()
getAlgorithmback to summary
public byte getAlgorithm()

Return the algorithm-id of the symmetric encryption algorithm used to encrypt the data.

Returns:byte

symmetric encryption algorithm

getChunkSizeback to summary
public int getChunkSize()
getIVback to summary
public byte[] getIV()
getIVLengthback to summary
public static int getIVLength(byte aeadAlgorithm)

Deprecated

use AEADUtils.getIVLength()

getTypeback to summary
public int getType()

Implements org.bouncycastle.bcpg.BCPGHeaderObject.getType.

Doc from org.bouncycastle.bcpg.BCPGHeaderObject.getType.

Return the header type.

Returns:int

header type code

Annotations
@Override
getVersionback to summary
public byte getVersion()