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 is - at evaluation time - marked as an encryption key.
|
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, getCompressionAlgorithmPreferences, getCompressionAlgorithmPreferences, getFeatures, getFeatures, getHashAlgorithmPreferences, getHashAlgorithmPreferences, getKeyExpirationDate, getKeyExpirationDateAt, getKeyFlags, getKeyFlags, getLatestSelfSignature, getMergedDanglingExternalSignatureChainEndsFrom, getPublicComponent, getRevocation, getSignatureChains, getSymmetricCipherPreferences, getSymmetricCipherPreferences, hasKeyFlags, isBound, isBoundAt, toDetailString
protected 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()
PublicKeyAlgorithmTags
public 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.OpenPGPCertificateComponent
getLatestSelfSignature
in class OpenPGPCertificate.OpenPGPCertificateComponent
evaluationTime
- reference timepublic boolean isEncryptionKey()
public boolean isEncryptionKey(java.util.Date evaluationTime)
evaluationTime
- evaluation timepublic 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.OpenPGPCertificateComponent
OpenPGPCertificate.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.OpenPGPCertificateComponent
OpenPGPCertificate.OpenPGPComponentKey
of this OpenPGPCertificate.OpenPGPCertificateComponent
.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object