Top Description Fields Constructors Methods
org.bouncycastle.openpgp

public Class PGPPublicKey

extends Object
implements PublicKeyAlgorithmTags
Class Inheritance
All Implemented Interfaces
org.bouncycastle.bcpg.PublicKeyAlgorithmTags
Imports
java.io.ByteArrayOutputStream, .IOException, .OutputStream, java.util.ArrayList, .Date, .Iterator, .List, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.x9.ECNamedCurveTable, .X9ECParameters, org.bouncycastle.bcpg.BCPGKey, .BCPGOutputStream, .DSAPublicBCPGKey, .ECPublicBCPGKey, .ElGamalPublicBCPGKey, .PublicKeyAlgorithmTags, .PublicKeyPacket, .PublicSubkeyPacket, .RSAPublicBCPGKey, .SignatureSubpacketTags, .TrustPacket, .UserAttributePacket, .UserDataPacket, .UserIDPacket, org.bouncycastle.openpgp.operator.KeyFingerPrintCalculator, org.bouncycastle.util.Arrays

general class to handle a PGP public key object.

Field Summary

Modifier and TypeField and Description
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
private byte[]
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
pack-priv List<UserDataPacket>
pack-priv List<List<PGPSignature>>
pack-priv List<TrustPacket>
private long
pack-priv List<PGPSignature>
private int
private static final int[]
pack-priv PublicKeyPacket
pack-priv List<PGPSignature>
pack-priv TrustPacket

Constructor Summary

AccessConstructor and Description
public
PGPPublicKey(PublicKeyPacket
packet describing the public key.
publicKeyPacket
,
KeyFingerPrintCalculator
calculator providing the digest support ot create the key fingerprint.
fingerPrintCalculator
)

Create a PGP public key from a packet descriptor using the passed in fingerPrintCalculator to do calculate the fingerprint and keyID.

pack-priv
PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List<PGPSignature> sigs, KeyFingerPrintCalculator fingerPrintCalculator)

pack-priv
pack-priv
PGPPublicKey(PGPPublicKey
the public key to copy.
pubKey
)

Copy constructor.

pack-priv
PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List<PGPSignature> keySigs, List<UserDataPacket> ids, List<TrustPacket> idTrusts, List<List<PGPSignature>> idSigs, KeyFingerPrintCalculator fingerPrintCalculator)

pack-priv

Method Summary

Modifier and TypeMethod and Description
private static PGPPublicKey
public static PGPPublicKey

Returns:

the re-certified key.
addCertification
(PGPPublicKey
the key the certification is to be added to.
key
,
byte[]
the raw bytes making up the user id..
rawID
,
PGPSignature
the new certification.
certification
)

Add a certification for an id to the given public key.

public static PGPPublicKey

Returns:

the re-certified key.
addCertification
(PGPPublicKey
the key the certification is to be added to.
key
,
String
the id the certification is associated with.
id
,
PGPSignature
the new certification.
certification
)

Add a certification for an id to the given public key.

public static PGPPublicKey

Returns:

the re-certified key.
addCertification
(PGPPublicKey
the key the certification is to be added to.
key
,
PGPUserAttributeSubpacketVector
the attributes the certification is associated with.
userAttributes
,
PGPSignature
the new certification.
certification
)

Add a certification for the given UserAttributeSubpackets to the given public key.

public static PGPPublicKey

Returns:

the new changed public key object.
addCertification
(PGPPublicKey
the key the revocation is to be added to.
key
,
PGPSignature
the key signature to be added.
certification
)

Add a revocation or some other key certification to a key.

public void
encode(OutputStream outStream)

public void
encode(OutputStream
stream to write the key encoding to.
outStream
,
boolean
if the purpose of encoding is to send key to other users.
forTransfer
)

Encode the key to outStream, with trust packets stripped out if forTransfer is true.

public int

Returns:

int
getAlgorithm
()

Return the algorithm code associated with the public key.

public int

Returns:

bit strength of key.
getBitStrength
()

Return the strength of the key in bits.

public Date

Returns:

creation time of key.
getCreationTime
()

public byte[]
public byte[]

Returns:

a encoded byte array representing the key.
getEncoded
(boolean
if the purpose of encoding is to send key to other users.
forTransfer
)

Return an encoding of the key, with trust packets stripped out if forTransfer is true.

private long
getExpirationTimeFromSig(boolean selfSigned, int signatureType)

public byte[]

Returns:

key fingerprint.
getFingerprint
()

Return the fingerprint of the key.

public long

Returns:

long
getKeyID
()

Return the keyID associated with the public key.

public Iterator<PGPSignature>

Returns:

an iterator (possibly empty) with all signatures/certifications.
getKeySignatures
()

Return all signatures/certifications directly associated with this key (ie, not to a user id).

public PublicKeyPacket
public Iterator<byte[]>

Returns:

an iterator of Strings.
getRawUserIDs
()

Return any userIDs associated with the key in raw byte form.

public Iterator<PGPSignature>

Returns:

an iterator (possibly empty) with all signatures/certifications.
getSignatures
()

Return all signatures/certifications associated with this key.

public Iterator<PGPSignature>

Returns:

an iterator of PGPSignature objects.
getSignaturesForID
(String
the id to be matched.
id
)

Return any signatures associated with the passed in id.

public Iterator<PGPSignature>

Returns:

an iterator of PGPSignature objects.
getSignaturesForID
(byte[]
the id to be matched in raw byte form.
rawID
)

Return any signatures associated with the passed in id.

private Iterator<PGPSignature>
public Iterator<PGPSignature>

Returns:

an iterator of PGPSignature objects issued by the key with keyID.
getSignaturesForKeyID
(long
the key id to be matched.
keyID
)

Return any signatures associated with the passed in key identifier keyID.

public Iterator<PGPSignature>

Returns:

an iterator of PGPSignature objects.
getSignaturesForUserAttribute
(PGPUserAttributeSubpacketVector
the vector of user attributes to be matched.
userAttributes
)

Return an iterator of signatures associated with the passed in user attributes.

public Iterator<PGPSignature>

Returns:

an iterator (possibly empty) of signatures of the given type.
getSignaturesOfType
(int
the type of the signature to be returned.
signatureType
)

Return signatures of the passed in type that are on this key.

public byte[]

Returns:

a byte array with trust data, null otherwise.
getTrustData
()

Return the trust data associated with the public key, if present.

public Iterator<PGPUserAttributeSubpacketVector>

Returns:

an iterator of PGPUserAttributeSubpacketVector objects.
getUserAttributes
()

Return any user attribute vectors associated with the key.

public Iterator<String>

Returns:

an iterator of Strings.
getUserIDs
()

Return any userIDs associated with the key.

public int

Returns:

number of valid days from creation time - zero means no expiry.
getValidDays
()

Deprecated use getValidSeconds(): greater than version 3 keys may be valid for less than a day.
public long

Returns:

number of valid seconds from creation time - zero means no expiry.
getValidSeconds
()

public int

Returns:

the version of this key.
getVersion
()

public boolean

Returns:

boolean indicating whether this (sub)key has had a (possibly invalid) revocation attached..
hasRevocation
()

Check whether this (sub)key has a revocation signature on it.

private void
init(KeyFingerPrintCalculator fingerPrintCalculator)

public boolean

Returns:

true if the key algorithm is suitable for encryption.
isEncryptionKey
()

Return true if this key has an algorithm type that makes it suitable to use for encryption.

public boolean

Returns:

true if a master key.
isMasterKey
()

Return true if this could be a master key.

public boolean

Returns:

boolean indicating whether this (sub)key has been revoked.
isRevoked
()

Deprecated this method is poorly named, use hasRevocation().
Check whether this (sub)key has a revocation signature on it.
public static PGPPublicKey

Returns:

joined key
join
(PGPPublicKey
local public key
key
,
PGPPublicKey
copy of the public key (e.g. from a key server)
copy
,
boolean
if true, trust packets from the copy are copied over into the resulting key
joinTrustPackets
,
boolean
if true, subkey signatures on the copy will be present in the merged key, even if key was not a subkey before.
allowSubkeySigsOnNonSubkey
)

Merge this the given local public key with another, potentially fresher copy.

private static PGPPublicKey
private static PGPPublicKey
removeCert(PGPPublicKey key, Object id, PGPSignature certification)

public static PGPPublicKey

Returns:

the re-certified key, null if the user attribute subpacket was not found on the key.
removeCertification
(PGPPublicKey
the key the certifications are to be removed from.
key
,
PGPUserAttributeSubpacketVector
the attributes to be removed.
userAttributes
)

Remove any certifications associated with a given user attribute subpacket on a key.

public static PGPPublicKey

Returns:

the re-certified key, null if the id was not found on the key.
removeCertification
(PGPPublicKey
the key the certifications are to be removed from.
key
,
String
the id that is to be removed.
id
)

Remove any certifications associated with a given id on a key.

public static PGPPublicKey

Returns:

the re-certified key, null if the id was not found on the key.
removeCertification
(PGPPublicKey
the key the certifications are to be removed from.
key
,
byte[]
the id that is to be removed in raw byte form.
rawID
)

Remove any certifications associated with a given id on a key.

public static PGPPublicKey

Returns:

the re-certified key, null if the certification was not found.
removeCertification
(PGPPublicKey
the key the certifications are to be removed from.
key
,
byte[]
the id that the certification is to be removed from (in its raw byte form)
id
,
PGPSignature
the certification to be removed.
certification
)

Remove a certification associated with a given id on a key.

public static PGPPublicKey

Returns:

the re-certified key, null if the certification was not found.
removeCertification
(PGPPublicKey
the key the certifications are to be removed from.
key
,
String
the id that the certification is to be removed from.
id
,
PGPSignature
the certification to be removed.
certification
)

Remove a certification associated with a given id on a key.

public static PGPPublicKey

Returns:

the re-certified key, null if the certification was not found.
removeCertification
(PGPPublicKey
the key the certifications are to be removed from.
key
,
PGPUserAttributeSubpacketVector
the user attributes that the certification is to be removed from.
userAttributes
,
PGPSignature
the certification to be removed.
certification
)

Remove a certification associated with a given user attributes on a key.

public static PGPPublicKey

Returns:

the modified key, null if the certification was not found.
removeCertification
(PGPPublicKey
the key the certifications are to be removed from.
key
,
PGPSignature
the certification to be removed.
certification
)

Remove a certification from the key.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cryptlibback to summary
pack-priv static final ASN1ObjectIdentifier cryptlib
curvey25519back to summary
pack-priv static final ASN1ObjectIdentifier curvey25519
eccback to summary
pack-priv static final ASN1ObjectIdentifier ecc
Ed25519back to summary
pack-priv static final ASN1ObjectIdentifier Ed25519
ellipticCurveback to summary
pack-priv static final ASN1ObjectIdentifier ellipticCurve
fingerprintback to summary
private byte[] fingerprint
id_Ed25519back to summary
pack-priv static final ASN1ObjectIdentifier id_Ed25519
id_Ed448back to summary
pack-priv static final ASN1ObjectIdentifier id_Ed448
id_edwards_curve_algsback to summary
pack-priv static final ASN1ObjectIdentifier id_edwards_curve_algs
id_X25519back to summary
pack-priv static final ASN1ObjectIdentifier id_X25519
id_X448back to summary
pack-priv static final ASN1ObjectIdentifier id_X448
idsback to summary
pack-priv List<UserDataPacket> ids
idSigsback to summary
pack-priv List<List<PGPSignature>> idSigs
idTrustsback to summary
pack-priv List<TrustPacket> idTrusts
keyIDback to summary
private long keyID
keySigsback to summary
pack-priv List<PGPSignature> keySigs
keyStrengthback to summary
private int keyStrength
MASTER_KEY_CERTIFICATION_TYPESback to summary
private static final int[] MASTER_KEY_CERTIFICATION_TYPES
publicPkback to summary
pack-priv PublicKeyPacket publicPk
subSigsback to summary
pack-priv List<PGPSignature> subSigs
trustPkback to summary
pack-priv TrustPacket trustPk

Constructor Detail

PGPPublicKeyback to summary
public PGPPublicKey(PublicKeyPacket publicKeyPacket, KeyFingerPrintCalculator fingerPrintCalculator) throws PGPException

Create a PGP public key from a packet descriptor using the passed in fingerPrintCalculator to do calculate the fingerprint and keyID.

Parameters
publicKeyPacket:PublicKeyPacket

packet describing the public key.

fingerPrintCalculator:KeyFingerPrintCalculator

calculator providing the digest support ot create the key fingerprint.

Exceptions
PGPException:
if the packet is faulty, or the required calculations fail.
PGPPublicKeyback to summary
pack-priv PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List<PGPSignature> sigs, KeyFingerPrintCalculator fingerPrintCalculator) throws PGPException
PGPPublicKeyback to summary
pack-priv PGPPublicKey(PGPPublicKey key, TrustPacket trust, List<PGPSignature> subSigs)
PGPPublicKeyback to summary
pack-priv PGPPublicKey(PGPPublicKey pubKey)

Copy constructor.

Parameters
pubKey:PGPPublicKey

the public key to copy.

PGPPublicKeyback to summary
pack-priv PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List<PGPSignature> keySigs, List<UserDataPacket> ids, List<TrustPacket> idTrusts, List<List<PGPSignature>> idSigs, KeyFingerPrintCalculator fingerPrintCalculator) throws PGPException
PGPPublicKeyback to summary
pack-priv PGPPublicKey(PGPPublicKey original, TrustPacket trustPk, List<PGPSignature> keySigs, List<UserDataPacket> ids, List<TrustPacket> idTrusts, List<List<PGPSignature>> idSigs) throws PGPException

Method Detail

addCertback to summary
private static PGPPublicKey addCert(PGPPublicKey key, UserDataPacket id, PGPSignature certification)
addCertificationback to summary
public static PGPPublicKey addCertification(PGPPublicKey key, byte[] rawID, PGPSignature certification)

Add a certification for an id to the given public key.

Parameters
key:PGPPublicKey

the key the certification is to be added to.

rawID:byte[]

the raw bytes making up the user id..

certification:PGPSignature

the new certification.

Returns:PGPPublicKey

the re-certified key.

addCertificationback to summary
public static PGPPublicKey addCertification(PGPPublicKey key, String id, PGPSignature certification)

Add a certification for an id to the given public key.

Parameters
key:PGPPublicKey

the key the certification is to be added to.

id:String

the id the certification is associated with.

certification:PGPSignature

the new certification.

Returns:PGPPublicKey

the re-certified key.

addCertificationback to summary
public static PGPPublicKey addCertification(PGPPublicKey key, PGPUserAttributeSubpacketVector userAttributes, PGPSignature certification)

Add a certification for the given UserAttributeSubpackets to the given public key.

Parameters
key:PGPPublicKey

the key the certification is to be added to.

userAttributes:PGPUserAttributeSubpacketVector

the attributes the certification is associated with.

certification:PGPSignature

the new certification.

Returns:PGPPublicKey

the re-certified key.

addCertificationback to summary
public static PGPPublicKey addCertification(PGPPublicKey key, PGPSignature certification)

Add a revocation or some other key certification to a key.

Parameters
key:PGPPublicKey

the key the revocation is to be added to.

certification:PGPSignature

the key signature to be added.

Returns:PGPPublicKey

the new changed public key object.

encodeback to summary
public void encode(OutputStream outStream) throws IOException
encodeback to summary
public void encode(OutputStream outStream, boolean forTransfer) throws IOException

Encode the key to outStream, with trust packets stripped out if forTransfer is true.

Parameters
outStream:OutputStream

stream to write the key encoding to.

forTransfer:boolean

if the purpose of encoding is to send key to other users.

Exceptions
IOException:
in case of encoding error.
getAlgorithmback to summary
public int getAlgorithm()

Return the algorithm code associated with the public key.

Returns:int

int

getBitStrengthback to summary
public int getBitStrength()

Return the strength of the key in bits.

Returns:int

bit strength of key.

getCreationTimeback to summary
public Date getCreationTime()
Returns:Date

creation time of key.

getEncodedback to summary
public byte[] getEncoded() throws IOException
getEncodedback to summary
public byte[] getEncoded(boolean forTransfer) throws IOException

Return an encoding of the key, with trust packets stripped out if forTransfer is true.

Parameters
forTransfer:boolean

if the purpose of encoding is to send key to other users.

Returns:byte[]

a encoded byte array representing the key.

Exceptions
IOException:
in case of encoding error.
getExpirationTimeFromSigback to summary
private long getExpirationTimeFromSig(boolean selfSigned, int signatureType)
getFingerprintback to summary
public byte[] getFingerprint()

Return the fingerprint of the key.

Returns:byte[]

key fingerprint.

getKeyIDback to summary
public long getKeyID()

Return the keyID associated with the public key.

Returns:long

long

getKeySignaturesback to summary
public Iterator<PGPSignature> getKeySignatures()

Return all signatures/certifications directly associated with this key (ie, not to a user id).

Returns:Iterator<PGPSignature>

an iterator (possibly empty) with all signatures/certifications.

getPublicKeyPacketback to summary
public PublicKeyPacket getPublicKeyPacket()
getRawUserIDsback to summary
public Iterator<byte[]> getRawUserIDs()

Return any userIDs associated with the key in raw byte form. No attempt is made to convert the IDs into Strings.

Returns:Iterator<byte[]>

an iterator of Strings.

getSignaturesback to summary
public Iterator<PGPSignature> getSignatures()

Return all signatures/certifications associated with this key.

Returns:Iterator<PGPSignature>

an iterator (possibly empty) with all signatures/certifications.

getSignaturesForIDback to summary
public Iterator<PGPSignature> getSignaturesForID(String id)

Return any signatures associated with the passed in id.

Parameters
id:String

the id to be matched.

Returns:Iterator<PGPSignature>

an iterator of PGPSignature objects.

getSignaturesForIDback to summary
public Iterator<PGPSignature> getSignaturesForID(byte[] rawID)

Return any signatures associated with the passed in id.

Parameters
rawID:byte[]

the id to be matched in raw byte form.

Returns:Iterator<PGPSignature>

an iterator of PGPSignature objects.

getSignaturesForIDback to summary
private Iterator<PGPSignature> getSignaturesForID(UserIDPacket id)
getSignaturesForKeyIDback to summary
public Iterator<PGPSignature> getSignaturesForKeyID(long keyID)

Return any signatures associated with the passed in key identifier keyID.

Parameters
keyID:long

the key id to be matched.

Returns:Iterator<PGPSignature>

an iterator of PGPSignature objects issued by the key with keyID.

getSignaturesForUserAttributeback to summary
public Iterator<PGPSignature> getSignaturesForUserAttribute(PGPUserAttributeSubpacketVector userAttributes)

Return an iterator of signatures associated with the passed in user attributes.

Parameters
userAttributes:PGPUserAttributeSubpacketVector

the vector of user attributes to be matched.

Returns:Iterator<PGPSignature>

an iterator of PGPSignature objects.

getSignaturesOfTypeback to summary
public Iterator<PGPSignature> getSignaturesOfType(int signatureType)

Return signatures of the passed in type that are on this key.

Parameters
signatureType:int

the type of the signature to be returned.

Returns:Iterator<PGPSignature>

an iterator (possibly empty) of signatures of the given type.

getTrustDataback to summary
public byte[] getTrustData()

Return the trust data associated with the public key, if present.

Returns:byte[]

a byte array with trust data, null otherwise.

getUserAttributesback to summary
public Iterator<PGPUserAttributeSubpacketVector> getUserAttributes()

Return any user attribute vectors associated with the key.

Returns:Iterator<PGPUserAttributeSubpacketVector>

an iterator of PGPUserAttributeSubpacketVector objects.

getUserIDsback to summary
public Iterator<String> getUserIDs()

Return any userIDs associated with the key.

Returns:Iterator<String>

an iterator of Strings.

getValidDaysback to summary
public int getValidDays()

Deprecated

use getValidSeconds(): greater than version 3 keys may be valid for less than a day.

Returns:int

number of valid days from creation time - zero means no expiry.

getValidSecondsback to summary
public long getValidSeconds()
Returns:long

number of valid seconds from creation time - zero means no expiry.

getVersionback to summary
public int getVersion()
Returns:int

the version of this key.

hasRevocationback to summary
public boolean hasRevocation()

Check whether this (sub)key has a revocation signature on it.

Returns:boolean

boolean indicating whether this (sub)key has had a (possibly invalid) revocation attached..

initback to summary
private void init(KeyFingerPrintCalculator fingerPrintCalculator) throws PGPException
isEncryptionKeyback to summary
public boolean isEncryptionKey()

Return true if this key has an algorithm type that makes it suitable to use for encryption.

Note

with version 4 keys KeyFlags subpackets should also be considered when present for determining the preferred use of the key.

Returns:boolean

true if the key algorithm is suitable for encryption.

isMasterKeyback to summary
public boolean isMasterKey()

Return true if this could be a master key.

Returns:boolean

true if a master key.

isRevokedback to summary
public boolean isRevoked()

Deprecated

this method is poorly named, use hasRevocation().

Check whether this (sub)key has a revocation signature on it.

Returns:boolean

boolean indicating whether this (sub)key has been revoked.

joinback to summary
public static PGPPublicKey join(PGPPublicKey key, PGPPublicKey copy, boolean joinTrustPackets, boolean allowSubkeySigsOnNonSubkey) throws PGPException

Merge this the given local public key with another, potentially fresher copy. The resulting PGPPublicKey contains the sum of both keys user-ids and signatures.

If joinTrustPackets is set to true and the copy carries a trust packet, the joined key will copy the trust-packet from the copy. Otherwise, it will carry the trust packet of the local key.

Parameters
key:PGPPublicKey

local public key

copy:PGPPublicKey

copy of the public key (e.g. from a key server)

joinTrustPackets:boolean

if true, trust packets from the copy are copied over into the resulting key

allowSubkeySigsOnNonSubkey:boolean

if true, subkey signatures on the copy will be present in the merged key, even if key was not a subkey before.

Returns:PGPPublicKey

joined key

removeCertback to summary
private static PGPPublicKey removeCert(PGPPublicKey key, Object id)
removeCertback to summary
private static PGPPublicKey removeCert(PGPPublicKey key, Object id, PGPSignature certification)
removeCertificationback to summary
public static PGPPublicKey removeCertification(PGPPublicKey key, PGPUserAttributeSubpacketVector userAttributes)

Remove any certifications associated with a given user attribute subpacket on a key.

Parameters
key:PGPPublicKey

the key the certifications are to be removed from.

userAttributes:PGPUserAttributeSubpacketVector

the attributes to be removed.

Returns:PGPPublicKey

the re-certified key, null if the user attribute subpacket was not found on the key.

removeCertificationback to summary
public static PGPPublicKey removeCertification(PGPPublicKey key, String id)

Remove any certifications associated with a given id on a key.

Parameters
key:PGPPublicKey

the key the certifications are to be removed from.

id:String

the id that is to be removed.

Returns:PGPPublicKey

the re-certified key, null if the id was not found on the key.

removeCertificationback to summary
public static PGPPublicKey removeCertification(PGPPublicKey key, byte[] rawID)

Remove any certifications associated with a given id on a key.

Parameters
key:PGPPublicKey

the key the certifications are to be removed from.

rawID:byte[]

the id that is to be removed in raw byte form.

Returns:PGPPublicKey

the re-certified key, null if the id was not found on the key.

removeCertificationback to summary
public static PGPPublicKey removeCertification(PGPPublicKey key, byte[] id, PGPSignature certification)

Remove a certification associated with a given id on a key.

Parameters
key:PGPPublicKey

the key the certifications are to be removed from.

id:byte[]

the id that the certification is to be removed from (in its raw byte form)

certification:PGPSignature

the certification to be removed.

Returns:PGPPublicKey

the re-certified key, null if the certification was not found.

removeCertificationback to summary
public static PGPPublicKey removeCertification(PGPPublicKey key, String id, PGPSignature certification)

Remove a certification associated with a given id on a key.

Parameters
key:PGPPublicKey

the key the certifications are to be removed from.

id:String

the id that the certification is to be removed from.

certification:PGPSignature

the certification to be removed.

Returns:PGPPublicKey

the re-certified key, null if the certification was not found.

removeCertificationback to summary
public static PGPPublicKey removeCertification(PGPPublicKey key, PGPUserAttributeSubpacketVector userAttributes, PGPSignature certification)

Remove a certification associated with a given user attributes on a key.

Parameters
key:PGPPublicKey

the key the certifications are to be removed from.

userAttributes:PGPUserAttributeSubpacketVector

the user attributes that the certification is to be removed from.

certification:PGPSignature

the certification to be removed.

Returns:PGPPublicKey

the re-certified key, null if the certification was not found.

removeCertificationback to summary
public static PGPPublicKey removeCertification(PGPPublicKey key, PGPSignature certification)

Remove a certification from the key.

Parameters
key:PGPPublicKey

the key the certifications are to be removed from.

certification:PGPSignature

the certification to be removed.

Returns:PGPPublicKey

the modified key, null if the certification was not found.