| Modifier and Type | Field 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 | |
| pack-priv List | |
| pack-priv List | |
| private long | |
| pack-priv List | |
| private int | |
| private static final int[] | |
| pack-priv PublicKeyPacket | |
| pack-priv List | |
| pack-priv TrustPacket |
| Access | Constructor 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 | |
| pack-priv | PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List<PGPSignature> keySigs, List<UserDataPacket> ids, List<TrustPacket> idTrusts, List<List<PGPSignature>> idSigs, KeyFingerPrintCalculator fingerPrintCalculator)
|
| pack-priv | PGPPublicKey(PGPPublicKey original, TrustPacket trustPk, List<PGPSignature> keySigs, List<UserDataPacket> ids, List<TrustPacket> idTrusts, List<List<PGPSignature>> idSigs)
|
| Modifier and Type | Method and Description |
|---|---|
| private static PGPPublicKey | |
| public static PGPPublicKey | Returns: the re-certified key.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.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.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.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 | |
| 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 | |
| public int | |
| public Date | |
| public byte[] | |
| public byte[] | Returns: a encoded byte array representing the key.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 | |
| public byte[] | |
| public long | |
| public Iterator | Returns: an iterator (possibly empty) with all signatures/certifications.Return all signatures/certifications directly associated with this key (ie, not to a user id). |
| public PublicKeyPacket | |
| public Iterator | Returns: an iterator of Strings.Return any userIDs associated with the key in raw byte form. |
| public Iterator | Returns: an iterator (possibly empty) with all signatures/certifications.Return all signatures/certifications associated with this key. |
| public Iterator | Returns: an iterator of PGPSignature objects.the id to be matched. id)Return any signatures associated with the passed in id. |
| public Iterator | Returns: an iterator of PGPSignature objects.the id to be matched in raw byte form. rawID)Return any signatures associated with the passed in id. |
| private Iterator | |
| public Iterator | Returns: an iterator of PGPSignature objects issued by the key with keyID.the key id to be matched. keyID)Return any signatures associated with the passed in key identifier keyID. |
| public Iterator | Returns: an iterator of PGPSignature objects.the vector of user attributes to be matched. userAttributes)Return an iterator of signatures associated with the passed in user attributes. |
| public Iterator | Returns: an iterator (possibly empty) of signatures of the given type.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.Return the trust data associated with the public key, if present. |
| public Iterator | Returns: an iterator of PGPUserAttributeSubpacketVector objects.Return any user attribute vectors associated with the key. |
| public Iterator | |
| public int | Returns: number of valid days from creation time - zero means no expiry.
Deprecated
use getValidSeconds(): greater than version 3 keys may be valid for less than a day.
|
| public long | |
| public int | |
| public boolean | Returns: boolean indicating whether this (sub)key has had a (possibly invalid) revocation attached..Check whether this (sub)key has a revocation signature on it. |
| private void | |
| public boolean | Returns: true if the key algorithm is suitable for encryption.Return true if this key has an algorithm type that makes it suitable to use for encryption. |
| public boolean | |
| public boolean | Returns: boolean indicating whether this (sub)key has been revoked.
Deprecated
this method is poorly named, use hasRevocation().
Check whether this (sub)key has a revocation signature on it.
|
| public static PGPPublicKey | Returns: joined keylocal 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 | |
| public static PGPPublicKey | Returns: the re-certified key, null if the user attribute subpacket was not found on the key.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.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.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.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.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.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.the key the certifications are to be removed from. key, PGPSignature the certification to be removed. certification)Remove a certification from the key. |
| cryptlib | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier cryptlib | |
| curvey25519 | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier curvey25519 | |
| ecc | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier ecc | |
| Ed25519 | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier Ed25519 | |
| ellipticCurve | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier ellipticCurve | |
| fingerprint | back to summary |
|---|---|
| private byte[] fingerprint | |
| id_Ed25519 | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier id_Ed25519 | |
| id_Ed448 | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier id_Ed448 | |
| id_edwards_curve_algs | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier id_edwards_curve_algs | |
| id_X25519 | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier id_X25519 | |
| id_X448 | back to summary |
|---|---|
| pack-priv static final ASN1ObjectIdentifier id_X448 | |
| ids | back to summary |
|---|---|
| pack-priv List<UserDataPacket> ids | |
| idSigs | back to summary |
|---|---|
| pack-priv List<List<PGPSignature>> idSigs | |
| idTrusts | back to summary |
|---|---|
| pack-priv List<TrustPacket> idTrusts | |
| keyID | back to summary |
|---|---|
| private long keyID | |
| keySigs | back to summary |
|---|---|
| pack-priv List<PGPSignature> keySigs | |
| keyStrength | back to summary |
|---|---|
| private int keyStrength | |
| MASTER_KEY_CERTIFICATION_TYPES | back to summary |
|---|---|
| private static final int[] MASTER_KEY_CERTIFICATION_TYPES | |
| publicPk | back to summary |
|---|---|
| pack-priv PublicKeyPacket publicPk | |
| subSigs | back to summary |
|---|---|
| pack-priv List<PGPSignature> subSigs | |
| trustPk | back to summary |
|---|---|
| pack-priv TrustPacket trustPk | |
| PGPPublicKey | back 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.
| |
| PGPPublicKey | back to summary |
|---|---|
| pack-priv PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List<PGPSignature> sigs, KeyFingerPrintCalculator fingerPrintCalculator) throws PGPException | |
| PGPPublicKey | back to summary |
|---|---|
| pack-priv PGPPublicKey(PGPPublicKey key, TrustPacket trust, List<PGPSignature> subSigs) | |
| PGPPublicKey | back to summary |
|---|---|
| pack-priv PGPPublicKey(PGPPublicKey pubKey) Copy constructor.
| |
| PGPPublicKey | back 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 | |
| PGPPublicKey | back to summary |
|---|---|
| pack-priv PGPPublicKey(PGPPublicKey original, TrustPacket trustPk, List<PGPSignature> keySigs, List<UserDataPacket> ids, List<TrustPacket> idTrusts, List<List<PGPSignature>> idSigs) throws PGPException | |
| addCert | back to summary |
|---|---|
| private static PGPPublicKey addCert(PGPPublicKey key, UserDataPacket id, PGPSignature certification) | |
| addCertification | back to summary |
|---|---|
| public static PGPPublicKey addCertification(PGPPublicKey key, byte[] rawID, PGPSignature certification) Add a certification for an id to the given public key.
| |
| addCertification | back to summary |
|---|---|
| public static PGPPublicKey addCertification(PGPPublicKey key, String id, PGPSignature certification) Add a certification for an id to the given public key.
| |
| addCertification | back to summary |
|---|---|
| public static PGPPublicKey addCertification(PGPPublicKey key, PGPUserAttributeSubpacketVector userAttributes, PGPSignature certification) Add a certification for the given UserAttributeSubpackets to the given public key.
| |
| addCertification | back to summary |
|---|---|
| public static PGPPublicKey addCertification(PGPPublicKey key, PGPSignature certification) Add a revocation or some other key certification to a key.
| |
| encode | back to summary |
|---|---|
| public void encode(OutputStream outStream) throws IOException | |
| encode | back 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.
| |
| getAlgorithm | back to summary |
|---|---|
| public int getAlgorithm() Return the algorithm code associated with the public key.
| |
| getBitStrength | back to summary |
|---|---|
| public int getBitStrength() Return the strength of the key in bits.
| |
| getCreationTime | back to summary |
|---|---|
public Date getCreationTime()
| |
| getEncoded | back to summary |
|---|---|
| public byte[] getEncoded() throws IOException | |
| getEncoded | back to summary |
|---|---|
| public byte[] getEncoded(boolean forTransfer) throws IOException Return an encoding of the key, with trust packets stripped out if forTransfer is true.
| |
| getExpirationTimeFromSig | back to summary |
|---|---|
| private long getExpirationTimeFromSig(boolean selfSigned, int signatureType) | |
| getFingerprint | back to summary |
|---|---|
| public byte[] getFingerprint() Return the fingerprint of the key.
| |
| getKeyID | back to summary |
|---|---|
| public long getKeyID() Return the keyID associated with the public key.
| |
| getKeySignatures | back to summary |
|---|---|
| public Iterator Return all signatures/certifications directly associated with this key (ie, not to a user id).
| |
| getPublicKeyPacket | back to summary |
|---|---|
| public PublicKeyPacket getPublicKeyPacket() | |
| getRawUserIDs | back to summary |
|---|---|
| public Iterator Return any userIDs associated with the key in raw byte form. No attempt is made to convert the IDs into Strings.
| |
| getSignatures | back to summary |
|---|---|
| public Iterator Return all signatures/certifications associated with this key.
| |
| getSignaturesForID | back to summary |
|---|---|
| public Iterator Return any signatures associated with the passed in id.
| |
| getSignaturesForID | back to summary |
|---|---|
| public Iterator Return any signatures associated with the passed in id.
| |
| getSignaturesForID | back to summary |
|---|---|
| private Iterator | |
| getSignaturesForKeyID | back to summary |
|---|---|
| public Iterator Return any signatures associated with the passed in key identifier keyID.
| |
| getSignaturesForUserAttribute | back to summary |
|---|---|
| public Iterator Return an iterator of signatures associated with the passed in user attributes.
| |
| getSignaturesOfType | back to summary |
|---|---|
| public Iterator Return signatures of the passed in type that are on this key.
| |
| getTrustData | back to summary |
|---|---|
| public byte[] getTrustData() Return the trust data associated with the public key, if present.
| |
| getUserAttributes | back to summary |
|---|---|
| public Iterator Return any user attribute vectors associated with the key.
| |
| getUserIDs | back to summary |
|---|---|
| public Iterator Return any userIDs associated with the key. | |
| getValidDays | back to summary |
|---|---|
| public int getValidDays()
Deprecated use getValidSeconds(): greater than version 3 keys may be valid for less than a day.
| |
| getValidSeconds | back to summary |
|---|---|
public long getValidSeconds()
| |
| getVersion | back to summary |
|---|---|
public int getVersion()
| |
| hasRevocation | back to summary |
|---|---|
| public boolean hasRevocation() Check whether this (sub)key has a revocation signature on it.
| |
| init | back to summary |
|---|---|
| private void init(KeyFingerPrintCalculator fingerPrintCalculator) throws PGPException | |
| isEncryptionKey | back 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.
| |
| isMasterKey | back to summary |
|---|---|
| public boolean isMasterKey() Return true if this could be a master key.
| |
| isRevoked | back to summary |
|---|---|
| public boolean isRevoked()
Deprecated this method is poorly named, use hasRevocation(). Check whether this (sub)key has a revocation signature on it.
| |
| join | back 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 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.
| |
| removeCert | back to summary |
|---|---|
| private static PGPPublicKey removeCert(PGPPublicKey key, Object id) | |
| removeCert | back to summary |
|---|---|
| private static PGPPublicKey removeCert(PGPPublicKey key, Object id, PGPSignature certification) | |
| removeCertification | back to summary |
|---|---|
| public static PGPPublicKey removeCertification(PGPPublicKey key, PGPUserAttributeSubpacketVector userAttributes) Remove any certifications associated with a given user attribute subpacket on a key.
| |
| removeCertification | back to summary |
|---|---|
| public static PGPPublicKey removeCertification(PGPPublicKey key, String id) Remove any certifications associated with a given id on a key.
| |
| removeCertification | back to summary |
|---|---|
| public static PGPPublicKey removeCertification(PGPPublicKey key, byte[] rawID) Remove any certifications associated with a given id on a key.
| |
| removeCertification | back to summary |
|---|---|
| public static PGPPublicKey removeCertification(PGPPublicKey key, byte[] id, PGPSignature certification) Remove a certification associated with a given id on a key.
| |
| removeCertification | back to summary |
|---|---|
| public static PGPPublicKey removeCertification(PGPPublicKey key, String id, PGPSignature certification) Remove a certification associated with a given id on a key.
| |
| removeCertification | back to summary |
|---|---|
| public static PGPPublicKey removeCertification(PGPPublicKey key, PGPUserAttributeSubpacketVector userAttributes, PGPSignature certification) Remove a certification associated with a given user attributes on a key.
| |
| removeCertification | back to summary |
|---|---|
| public static PGPPublicKey removeCertification(PGPPublicKey key, PGPSignature certification) Remove a certification from the key.
| |