Bouncy Castle Cryptography Library 1.79

org.bouncycastle.bcpg
Class Packet

java.lang.Object
  |
  +--org.bouncycastle.bcpg.Packet
All Implemented Interfaces:
PacketTags
Direct Known Subclasses:
ContainedPacket, InputStreamPacket

public class Packet
extends java.lang.Object
implements PacketTags


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
Packet()
           
 
Method Summary
 int getPacketTag()
          Return the tag of the packet.
 boolean hasNewPacketFormat()
          Return true, if this instance of a packet was encoded using the new packet format.
 boolean isCritical()
          Returns whether the packet is to be considered critical for v6 implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Packet

public Packet()
Method Detail

getPacketTag

public final int getPacketTag()
Return the tag of the packet.
Returns:
packet tag

hasNewPacketFormat

public boolean hasNewPacketFormat()
Return true, if this instance of a packet was encoded using the new packet format. If the packet was encoded using the old legacy format, return false instead.
Returns:
true if new packet format encoding is used

isCritical

public boolean isCritical()
Returns whether the packet is to be considered critical for v6 implementations. Packets with tags less or equal to 39 are critical. Tags 40 to 59 are reserved for unassigned, non-critical packets. Tags 60 to 63 are non-critical private or experimental packets.
Returns:
true if the packet is critical, false otherwise.
See Also:
OpenPGP - Packet Tags

Bouncy Castle Cryptography Library 1.79