|
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.PublicKeyEncSessionPacket
basic packet for a PGP public key
Field Summary | |
static int |
VERSION_3
Version 3 PKESK packet. |
static int |
VERSION_6
Version 6 PKESK packet. |
Fields inherited from interface org.bouncycastle.bcpg.PublicKeyAlgorithmTags |
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 |
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 | |
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. |
Method Summary | |
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. |
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_3
V1 SEIPD
or SED
packets.
public static final int VERSION_6
V2 SEIPD
packets.
Constructor Detail |
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 dataMethod Detail |
public 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
|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |