Top Description Fields Constructors Methods
org.bouncycastle.openpgp

public Class PGPSignatureSubpacketVector

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .Collection, .Date, .List, org.bouncycastle.bcpg.SignaturePacket, .SignatureSubpacket, .SignatureSubpacketTags, org.bouncycastle.bcpg.sig.Exportable, .Features, .IntendedRecipientFingerprint, .IssuerFingerprint, .IssuerKeyID, .KeyExpirationTime, .KeyFlags, .LibrePGPPreferredEncryptionModes, .NotationData, .PolicyURI, .PreferredAEADCiphersuites, .PreferredAlgorithms, .PrimaryUserID, .RegularExpression, .Revocable, .RevocationKey, .RevocationReason, .SignatureCreationTime, .SignatureExpirationTime, .SignatureTarget, .SignerUserID, .TrustSignature

Container for a list of signature subpackets.

Field Summary

Modifier and TypeField and Description
pack-priv SignatureSubpacket[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static PGPSignatureSubpacketVector

Returns:

PGPSignatureSubpacketVector
fromSubpackets
(Collection<SignatureSubpacket>
collection of items or null
packets
)

Create a new PGPSignatureSubpacketVector from the given Collection of SignatureSubpacket items.

public static PGPSignatureSubpacketVector

Returns:

PGPSignatureSubpacketVector
fromSubpackets
(SignatureSubpacket[]
array of items or null
packets
)

Create a new PGPSignatureSubpacketVector from the given SignatureSubpacket[].

public int[]
public PGPSignatureList
public Exportable
public Features
public IntendedRecipientFingerprint
public IntendedRecipientFingerprint[]
public IssuerFingerprint
public long
public long

Returns:

seconds a key is valid for.
getKeyExpirationTime
()

Return the number of seconds a key is valid for after its creation date.

public int
public NotationData[]
getNotationDataOccurences()
Deprecated use getNotationDataOccurrences()

public NotationData[]
public NotationData[]

Returns:

notations with matching name
getNotationDataOccurrences
(String
notation name
notationName
)

Return all NotationData occurrences which match the given notation name.

public PolicyURI
public PolicyURI[]
public int[]

Returns:

preferred AEAD Algorithms
getPreferredAEADAlgorithms
()

This method is BROKEN!

public PreferredAEADCiphersuites

Returns:

OpenPGP AEAD ciphersuites
getPreferredAEADCiphersuites
()

Return the preferred AEAD ciphersuites denoted in the signature.

public int[]
public int[]
public int[]

Returns:

LibrePGP encryption modes
getPreferredLibrePgpEncryptionModes
()

Return the preferred LibrePGP encryption modes denoted in the signature.

public int[]
public RegularExpression
public RegularExpression[]
public Revocable
public RevocationKey[]
getRevocationKeys()
References Deprecated RevocationKey is deprecated or references (maybe indirectly) at least one deprecated element.

public RevocationReason
public Date
public long

Returns:

seconds a signature is valid for.
getSignatureExpirationTime
()

Return the number of seconds a signature is valid for after its creation date.

public SignatureTarget
public String
public SignatureSubpacket
getSubpacket(int type)

public SignatureSubpacket[]

Returns:

an array of zero or more matching subpackets.
getSubpackets
(int
subpacket type code
type
)

Return all signature subpackets of the passed in type.

public TrustSignature
public boolean

Returns:

true if present, false otherwise.
hasSubpacket
(int
type to look for.
type
)

Return true if a particular subpacket type exists.

public boolean
public boolean
public boolean
public int

Returns:

size of the packet vector.
size
()

Return the number of packets this vector contains.

public SignatureSubpacket[]

Returns:

an array containing the vector subpackets in order.
toArray
()

Return a copy of the subpackets in this vector.

pack-priv SignatureSubpacket[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

packetsback to summary
pack-priv SignatureSubpacket[] packets

Constructor Detail

PGPSignatureSubpacketVectorback to summary
pack-priv PGPSignatureSubpacketVector(SignatureSubpacket[] packets)

Method Detail

fromSubpacketsback to summary
public static PGPSignatureSubpacketVector fromSubpackets(Collection<SignatureSubpacket> packets)

Create a new PGPSignatureSubpacketVector from the given Collection of SignatureSubpacket items. If the collection is

null
, return an empty PGPSignatureSubpacketVector.
Parameters
packets:Collection<SignatureSubpacket>

collection of items or null

Returns:PGPSignatureSubpacketVector

PGPSignatureSubpacketVector

fromSubpacketsback to summary
public static PGPSignatureSubpacketVector fromSubpackets(SignatureSubpacket[] packets)

Create a new PGPSignatureSubpacketVector from the given SignatureSubpacket[]. If the array is

null
, return an empty PGPSignatureSubpacketVector.
Parameters
packets:SignatureSubpacket[]

array of items or null

Returns:PGPSignatureSubpacketVector

PGPSignatureSubpacketVector

getCriticalTagsback to summary
public int[] getCriticalTags()
getEmbeddedSignaturesback to summary
public PGPSignatureList getEmbeddedSignatures() throws PGPException
getExportableback to summary
public Exportable getExportable()
getFeaturesback to summary
public Features getFeatures()
getIntendedRecipientFingerprintback to summary
public IntendedRecipientFingerprint getIntendedRecipientFingerprint()
getIntendedRecipientFingerprintsback to summary
public IntendedRecipientFingerprint[] getIntendedRecipientFingerprints()
getIssuerFingerprintback to summary
public IssuerFingerprint getIssuerFingerprint()
getIssuerKeyIDback to summary
public long getIssuerKeyID()
getKeyExpirationTimeback to summary
public long getKeyExpirationTime()

Return the number of seconds a key is valid for after its creation date. A value of zero means the key never expires.

Returns:long

seconds a key is valid for.

getKeyFlagsback to summary
public int getKeyFlags()
getNotationDataOccurencesback to summary
public NotationData[] getNotationDataOccurences()

Deprecated

use getNotationDataOccurrences()

getNotationDataOccurrencesback to summary
public NotationData[] getNotationDataOccurrences()
getNotationDataOccurrencesback to summary
public NotationData[] getNotationDataOccurrences(String notationName)

Return all NotationData occurrences which match the given notation name.

Parameters
notationName:String

notation name

Returns:NotationData[]

notations with matching name

getPolicyURIback to summary
public PolicyURI getPolicyURI()
getPolicyURIsback to summary
public PolicyURI[] getPolicyURIs()
getPreferredAEADAlgorithmsback to summary
public int[] getPreferredAEADAlgorithms()

This method is BROKEN!

Returns:int[]

preferred AEAD Algorithms

Annotations
@Deprecated
getPreferredAEADCiphersuitesback to summary
public PreferredAEADCiphersuites getPreferredAEADCiphersuites()

Return the preferred AEAD ciphersuites denoted in the signature.

Returns:PreferredAEADCiphersuites

OpenPGP AEAD ciphersuites

getPreferredCompressionAlgorithmsback to summary
public int[] getPreferredCompressionAlgorithms()
getPreferredHashAlgorithmsback to summary
public int[] getPreferredHashAlgorithms()
getPreferredLibrePgpEncryptionModesback to summary
public int[] getPreferredLibrePgpEncryptionModes()

Return the preferred LibrePGP encryption modes denoted in the signature.

Note

The LibrePGP spec states that this subpacket shall be ignored and the application shall instead assume org.bouncycastle.bcpg.AEADAlgorithmTags#OCB.

Returns:int[]

LibrePGP encryption modes

getPreferredSymmetricAlgorithmsback to summary
public int[] getPreferredSymmetricAlgorithms()
getRegularExpressionback to summary
public RegularExpression getRegularExpression()
getRegularExpressionsback to summary
public RegularExpression[] getRegularExpressions()
getRevocableback to summary
public Revocable getRevocable()
getRevocationKeysback to summary
public RevocationKey[] getRevocationKeys()

References Deprecated

RevocationKey is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

getRevocationReasonback to summary
public RevocationReason getRevocationReason()
getSignatureCreationTimeback to summary
public Date getSignatureCreationTime()
getSignatureExpirationTimeback to summary
public long getSignatureExpirationTime()

Return the number of seconds a signature is valid for after its creation date. A value of zero means the signature never expires.

Returns:long

seconds a signature is valid for.

getSignatureTargetback to summary
public SignatureTarget getSignatureTarget()
getSignerUserIDback to summary
public String getSignerUserID()
getSubpacketback to summary
public SignatureSubpacket getSubpacket(int type)
getSubpacketsback to summary
public SignatureSubpacket[] getSubpackets(int type)

Return all signature subpackets of the passed in type.

Parameters
type:int

subpacket type code

Returns:SignatureSubpacket[]

an array of zero or more matching subpackets.

getTrustback to summary
public TrustSignature getTrust()
hasSubpacketback to summary
public boolean hasSubpacket(int type)

Return true if a particular subpacket type exists.

Parameters
type:int

type to look for.

Returns:boolean

true if present, false otherwise.

isExportableback to summary
public boolean isExportable()
isPrimaryUserIDback to summary
public boolean isPrimaryUserID()
isRevocableback to summary
public boolean isRevocable()
sizeback to summary
public int size()

Return the number of packets this vector contains.

Returns:int

size of the packet vector.

toArrayback to summary
public SignatureSubpacket[] toArray()

Return a copy of the subpackets in this vector.

Returns:SignatureSubpacket[]

an array containing the vector subpackets in order.

toSubpacketArrayback to summary
pack-priv SignatureSubpacket[] toSubpacketArray()