public abstract static class OpenPGPCertificate.OpenPGPComponentKey extends OpenPGPCertificate.OpenPGPCertificateComponent
OpenPGPCertificate.OpenPGPPrimaryKey, or an OpenPGPCertificate.OpenPGPSubkey.| Modifier and Type | Field and Description |
|---|---|
protected PGPPublicKey |
rawPubkey |
| Constructor and Description |
|---|
OpenPGPComponentKey(PGPPublicKey rawPubkey,
OpenPGPCertificate certificate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getAlgorithm()
Return the public key algorithm.
|
java.util.Date |
getCreationTime()
Return the creation time of this key.
|
protected OpenPGPCertificate.OpenPGPComponentKey |
getKeyComponent()
Return the
OpenPGPCertificate.OpenPGPComponentKey belonging to this OpenPGPCertificate.OpenPGPCertificateComponent. |
KeyIdentifier |
getKeyIdentifier()
Return the
KeyIdentifier of this key. |
OpenPGPCertificate.OpenPGPComponentSignature |
getLatestSelfSignature(java.util.Date evaluationTime)
Return the (at evaluation time) latest self-signature on the component.
|
PGPPublicKey |
getPGPPublicKey()
Return the underlying
PGPPublicKey of this OpenPGPCertificate.OpenPGPComponentKey. |
int |
getVersion()
Return the public key version.
|
int |
hashCode() |
boolean |
isCertificationKey()
Return true, if the key is currently marked as certification key that can sign 3rd-party certificates.
|
boolean |
isCertificationKey(java.util.Date evaluationTime)
Return true, if the key is - at evaluation time - marked as certification key that can sign 3rd-party
certificates.
|
boolean |
isEncryptionKey()
Return true, if the key is currently marked as encryption key.
|
boolean |
isEncryptionKey(java.util.Date evaluationTime)
Return true, if the key is - at evaluation time - marked as an encryption key.
|
boolean |
isEncryptionKey(java.util.Date evaluationTime,
int... keyFlags)
Return true, if the key is - at evaluation time - marked as an encryption key and carries any of the given
key flags.
|
abstract boolean |
isPrimaryKey()
Return true, if this
OpenPGPCertificate.OpenPGPComponentKey represents the primary key of an OpenPGPCertificate. |
boolean |
isSigningKey()
Return true, if the key is currently marked as a signing key for message signing.
|
boolean |
isSigningKey(java.util.Date evaluationTime)
Return true, if the key is - at evaluation time - marked as signing key for message signing.
|
getAEADCipherSuitePreferences, getAEADCipherSuitePreferences, getApplyingSubpacket, getCertificate, getCertification, getCertification, getCompressionAlgorithmPreferences, getCompressionAlgorithmPreferences, getFeatures, getFeatures, getHashAlgorithmPreferences, getHashAlgorithmPreferences, getKeyExpirationDate, getKeyExpirationDateAt, getKeyFlags, getKeyFlags, getLatestSelfSignature, getMergedDanglingExternalSignatureChainEndsFrom, getPublicComponent, getRevocation, getRevocation, getSelfSignatureChains, getSignatureChains, getSymmetricCipherPreferences, getSymmetricCipherPreferences, getThirdPartyCertifications, getThirdPartyRevocations, getThirdPartySignatureChainsBy, hasKeyFlags, isBound, isBoundAt, toDetailStringprotected final PGPPublicKey rawPubkey
public OpenPGPComponentKey(PGPPublicKey rawPubkey, OpenPGPCertificate certificate)
rawPubkey - public keycertificate - certificatepublic PGPPublicKey getPGPPublicKey()
PGPPublicKey of this OpenPGPCertificate.OpenPGPComponentKey.public KeyIdentifier getKeyIdentifier()
KeyIdentifier of this key.public int getAlgorithm()
PublicKeyAlgorithmTagspublic int getVersion()
public java.util.Date getCreationTime()
public abstract boolean isPrimaryKey()
OpenPGPCertificate.OpenPGPComponentKey represents the primary key of an OpenPGPCertificate.public OpenPGPCertificate.OpenPGPComponentSignature getLatestSelfSignature(java.util.Date evaluationTime)
OpenPGPCertificate.OpenPGPCertificateComponentgetLatestSelfSignature in class OpenPGPCertificate.OpenPGPCertificateComponentevaluationTime - reference timepublic boolean isEncryptionKey()
public boolean isEncryptionKey(java.util.Date evaluationTime)
evaluationTime - evaluation timepublic boolean isEncryptionKey(java.util.Date evaluationTime,
int... keyFlags)
isEncryptionKey(evalTime, A, B). To instead check, if the key has BOTH flags A AND B, call
isEncryptionKey(evalTime, A | B).
evaluationTime - evaluation timekeyFlags - key flagspublic boolean isSigningKey()
public boolean isSigningKey(java.util.Date evaluationTime)
evaluationTime - evaluation timepublic boolean isCertificationKey()
public boolean isCertificationKey(java.util.Date evaluationTime)
evaluationTime - evaluation timeprotected OpenPGPCertificate.OpenPGPComponentKey getKeyComponent()
OpenPGPCertificate.OpenPGPCertificateComponentOpenPGPCertificate.OpenPGPComponentKey belonging to this OpenPGPCertificate.OpenPGPCertificateComponent.
If this OpenPGPCertificate.OpenPGPCertificateComponent is an instance of OpenPGPCertificate.OpenPGPComponentKey,
the method simply returns this. If instead, the
OpenPGPCertificate.OpenPGPCertificateComponent is an OpenPGPCertificate.OpenPGPIdentityComponent,
the primary key it is bound to is returned.getKeyComponent in class OpenPGPCertificate.OpenPGPCertificateComponentOpenPGPCertificate.OpenPGPComponentKey of this OpenPGPCertificate.OpenPGPCertificateComponent.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object