public class PublicKeyEncSessionPacket extends ContainedPacket implements PublicKeyAlgorithmTags
Modifier and Type | Field and Description |
---|---|
static int |
VERSION_3
Version 3 PKESK packet.
|
static int |
VERSION_6
Version 6 PKESK packet.
|
AEDH, AEDSA, DIFFIE_HELLMAN, DSA, EC, ECDH, ECDSA, Ed25519, Ed448, EDDSA, EDDSA_LEGACY, ELGAMAL_ENCRYPT, ELGAMAL_GENERAL, EXPERIMENTAL_1, EXPERIMENTAL_10, EXPERIMENTAL_11, EXPERIMENTAL_2, EXPERIMENTAL_3, EXPERIMENTAL_4, EXPERIMENTAL_5, EXPERIMENTAL_6, EXPERIMENTAL_7, EXPERIMENTAL_8, EXPERIMENTAL_9, RSA_ENCRYPT, RSA_GENERAL, RSA_SIGN, X25519, X448
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 and Description |
---|
PublicKeyEncSessionPacket(int keyVersion,
byte[] keyFingerprint,
int algorithm,
byte[][] data)
Create a new V6 PKESK packet.
|
PublicKeyEncSessionPacket(long keyID,
int algorithm,
byte[][] data)
Create a new V3 PKESK packet.
|
Modifier and Type | Method and Description |
---|---|
static PublicKeyEncSessionPacket |
createV3PKESKPacket(long keyID,
int algorithm,
byte[][] data)
Create a new V3 PKESK packet.
|
static PublicKeyEncSessionPacket |
createV6PKESKPacket(int keyVersion,
byte[] keyFingerprint,
int algorithm,
byte[][] data)
Create a new V6 PKESK packet.
|
void |
encode(BCPGOutputStream out) |
int |
getAlgorithm()
Return the public key algorithm of the recipient key.
|
byte[][] |
getEncSessionKey() |
byte[] |
getKeyFingerprint()
Return the fingerprint of the recipient key.
|
long |
getKeyID()
Return the id of the recipient key.
|
int |
getKeyVersion()
Return the version number of the recipient key.
|
int |
getVersion()
Return the version of this PKESK packet.
|
getEncoded, getEncoded
getPacketTag, hasNewPacketFormat, isCritical
public static final int VERSION_3
public static final int VERSION_6
V2 SEIPD
packets.public PublicKeyEncSessionPacket(long keyID, int algorithm, byte[][] data)
keyID
- ID of the recipient key, 0 for anonymousalgorithm
- public key algorithmdata
- session datapublic PublicKeyEncSessionPacket(int keyVersion, byte[] keyFingerprint, int algorithm, byte[][] data)
keyVersion
- version of the keykeyFingerprint
- fingerprint of the keyalgorithm
- public key algorithmdata
- session datapublic static PublicKeyEncSessionPacket createV3PKESKPacket(long keyID, int algorithm, byte[][] data)
keyID
- ID of the recipient key, 0 for anonymousalgorithm
- public key algorithmdata
- session datapublic static PublicKeyEncSessionPacket createV6PKESKPacket(int keyVersion, byte[] keyFingerprint, int algorithm, byte[][] data)
keyVersion
- version of the keykeyFingerprint
- fingerprint of the keyalgorithm
- public key algorithmdata
- session datapublic int getVersion()
public long getKeyID()
public byte[] getKeyFingerprint()
public int getKeyVersion()
public int getAlgorithm()
public byte[][] getEncSessionKey()
public void encode(BCPGOutputStream out) throws java.io.IOException
encode
in class ContainedPacket
java.io.IOException