Top Description Fields Constructors Methods
org.bouncycastle.bcpg

public Class SymmetricEncIntegrityPacket

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

A symmetric key encrypted packet with an associated integrity check code.

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int
pack-priv int
pack-priv byte[]
pack-priv int
public static final int
VERSION_1

Version 1 SEIPD packet.

public static final int
VERSION_2

Version 2 SEIPD packet.

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
SymmetricEncIntegrityPacket(BCPGInputStream in, boolean newPacketFormat)

public
SymmetricEncIntegrityPacket()
Deprecated use createVersion1Packet()

private
SymmetricEncIntegrityPacket(int version, int algorithm, int aeadAlgorithm, int chunkSize, byte[] salt)

Method Summary

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

public static SymmetricEncIntegrityPacket
public static SymmetricEncIntegrityPacket
createVersion2Packet(int algorithm, int aeadAlgorithm, int chunkSize, byte[] salt)

public void
public byte[]

Returns:

aadata
getAAData
()

Return the AEAD additional authenticated data, which is also used as HKDF info.

public int

Returns:

AEAD algorithm
getAeadAlgorithm
()

Return the AEAD algorithm.

public int

Returns:

chunksize
getChunkSize
()

Return the chunksize for the AEAD construction.

public int

Returns:

cipher algorithm
getCipherAlgorithm
()

Return the cipher algorithm.

public byte[]

Returns:

salt
getSalt
()

Return the salt used to derive the message key.

public int
getType()

Implements org.bouncycastle.bcpg.BCPGHeaderObject.getType.

Return the header type.

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

Field Detail

aeadAlgorithmback to summary
pack-priv int aeadAlgorithm
chunkSizeback to summary
pack-priv int chunkSize
cipherAlgorithmback to summary
pack-priv int cipherAlgorithm
saltback to summary
pack-priv byte[] salt
versionback to summary
pack-priv int version
VERSION_1back to summary
public static final int VERSION_1

Version 1 SEIPD packet. Used only with SymmetricKeyEncSessionPacket#VERSION_4 or PublicKeyEncSessionPacket#VERSION_3.

VERSION_2back to summary
public static final int VERSION_2

Version 2 SEIPD packet. Used only with SymmetricKeyEncSessionPacket#VERSION_6 or PublicKeyEncSessionPacket#VERSION_6.

Constructor Detail

SymmetricEncIntegrityPacketback to summary
pack-priv SymmetricEncIntegrityPacket(BCPGInputStream in) throws IOException
SymmetricEncIntegrityPacketback to summary
pack-priv SymmetricEncIntegrityPacket(BCPGInputStream in, boolean newPacketFormat) throws IOException
SymmetricEncIntegrityPacketback to summary
public SymmetricEncIntegrityPacket()

Deprecated

use createVersion1Packet()

SymmetricEncIntegrityPacketback to summary
private SymmetricEncIntegrityPacket(int version, int algorithm, int aeadAlgorithm, int chunkSize, byte[] salt)

Method Detail

createAADataback to summary
public static byte[] createAAData(int version, int cipherAlgorithm, int aeadAlgorithm, int chunkSize)
createVersion1Packetback to summary
public static SymmetricEncIntegrityPacket createVersion1Packet()
createVersion2Packetback to summary
public static SymmetricEncIntegrityPacket createVersion2Packet(int algorithm, int aeadAlgorithm, int chunkSize, byte[] salt)
encodeback to summary
public void encode(BCPGOutputStream bcpgOut) throws IOException

Implements org.bouncycastle.bcpg.BCPGHeaderObject.encode.

Annotations
@Override
getAADataback to summary
public byte[] getAAData()

Return the AEAD additional authenticated data, which is also used as HKDF info. V2 SEIPD packet only.

Returns:byte[]

aadata

getAeadAlgorithmback to summary
public int getAeadAlgorithm()

Return the AEAD algorithm. V2 SEIPD packet only.

Returns:int

AEAD algorithm

getChunkSizeback to summary
public int getChunkSize()

Return the chunksize for the AEAD construction. V2 SEIPD packet only.

Returns:int

chunksize

getCipherAlgorithmback to summary
public int getCipherAlgorithm()

Return the cipher algorithm. V2 SEIPD packet only.

Returns:int

cipher algorithm

getSaltback to summary
public byte[] getSalt()

Return the salt used to derive the message key. V2 SEIPD packet only.

Returns:byte[]

salt

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 int getVersion()