|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.bcpg.Packet
org.bouncycastle.bcpg.ContainedPacket
org.bouncycastle.bcpg.SymmetricKeyEncSessionPacket
Basic type for a symmetric encrypted session key packet
Field Summary | |
static int |
VERSION_4
Version 4 SKESK packet. |
static int |
VERSION_5
Version 5 SKESK packet. |
static int |
VERSION_6
Version 6 SKESK packet. |
Fields inherited from interface org.bouncycastle.bcpg.PacketTags |
AEAD_ENC_DATA, COMPRESSED_DATA, EXPERIMENTAL_1, EXPERIMENTAL_2, EXPERIMENTAL_3, EXPERIMENTAL_4, LITERAL_DATA, MARKER, MOD_DETECTION_CODE, ONE_PASS_SIGNATURE, PADDING, PUBLIC_KEY, PUBLIC_KEY_ENC_SESSION, PUBLIC_SUBKEY, RESERVED, SECRET_KEY, SECRET_SUBKEY, SIGNATURE, SYM_ENC_INTEGRITY_PRO, SYMMETRIC_KEY_ENC, SYMMETRIC_KEY_ENC_SESSION, TRUST, USER_ATTRIBUTE, USER_ID |
Constructor Summary | |
SymmetricKeyEncSessionPacket(BCPGInputStream in)
|
|
SymmetricKeyEncSessionPacket(BCPGInputStream in,
boolean newPacketFormat)
|
|
SymmetricKeyEncSessionPacket(int encAlgorithm,
S2K s2k,
byte[] secKeyData)
Deprecated. use createVersion4Packet() |
Method Summary | |
static byte[] |
createAAData(int version,
int encAlgorithm,
int aeadAlgorithm)
|
static SymmetricKeyEncSessionPacket |
createV4Packet(int encAlgorithm,
S2K s2k,
byte[] secKeyData)
Create a v4 SKESK packet. |
static SymmetricKeyEncSessionPacket |
createV5Packet(int encAlgorithm,
int aeadAlgorithm,
byte[] iv,
S2K s2k,
byte[] secKeyData,
byte[] authTag)
Create a v5 SKESK packet. |
static SymmetricKeyEncSessionPacket |
createV6Packet(int encAlgorithm,
int aeadAlgorithm,
byte[] iv,
S2K s2k,
byte[] secKeyData,
byte[] authTag)
Create a v6 SKESK packet. |
void |
encode(BCPGOutputStream out)
|
byte[] |
getAAData()
|
int |
getAeadAlgorithm()
Return the AEAD algorithm tag. |
byte[] |
getAuthTag()
Return the authentication tag for the AEAD mode. |
int |
getEncAlgorithm()
|
byte[] |
getIv()
Return the IV for the AEAD mode. |
S2K |
getS2K()
|
byte[] |
getSecKeyData()
|
int |
getVersion()
|
Methods inherited from class org.bouncycastle.bcpg.ContainedPacket |
getEncoded, getEncoded |
Methods inherited from class org.bouncycastle.bcpg.Packet |
getPacketTag, hasNewPacketFormat, isCritical |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VERSION_4
V1 SEIPD
or SED
packets.
public static final int VERSION_5
AED
packets.
public static final int VERSION_6
V2 SEIPD
packets.
Constructor Detail |
public SymmetricKeyEncSessionPacket(BCPGInputStream in) throws java.io.IOException
public SymmetricKeyEncSessionPacket(BCPGInputStream in, boolean newPacketFormat) throws java.io.IOException
public SymmetricKeyEncSessionPacket(int encAlgorithm, S2K s2k, byte[] secKeyData)
encAlgorithm
- symmetric encryption algorithms2k
- s2ksecKeyData
- encrypted session keyMethod Detail |
public static SymmetricKeyEncSessionPacket createV4Packet(int encAlgorithm, S2K s2k, byte[] secKeyData)
encAlgorithm
- symmetric encryption algorithms2k
- s2k specifiersecKeyData
- encrypted session keypublic static SymmetricKeyEncSessionPacket createV5Packet(int encAlgorithm, int aeadAlgorithm, byte[] iv, S2K s2k, byte[] secKeyData, byte[] authTag)
encAlgorithm
- symmetric encryption algorithmaeadAlgorithm
- aead algorithmiv
- initialization vectors2k
- s2k specifiersecKeyData
- encrypted session keyauthTag
- authentication tagpublic static SymmetricKeyEncSessionPacket createV6Packet(int encAlgorithm, int aeadAlgorithm, byte[] iv, S2K s2k, byte[] secKeyData, byte[] authTag)
encAlgorithm
- symmetric encryption algorithmaeadAlgorithm
- aead algorithms2k
- s2k specifieriv
- initialization vectorsecKeyData
- encrypted session keyauthTag
- authentication tagpublic int getEncAlgorithm()
public S2K getS2K()
public byte[] getSecKeyData()
public int getVersion()
public int getAeadAlgorithm()
public byte[] getIv()
public byte[] getAuthTag()
public byte[] getAAData()
public static byte[] createAAData(int version, int encAlgorithm, int aeadAlgorithm)
public void encode(BCPGOutputStream out) throws java.io.IOException
encode
in class ContainedPacket
java.io.IOException
|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |