Package org.pgpainless.signature
Class DetachedSignature
- java.lang.Object
-
- org.pgpainless.signature.DetachedSignature
-
public class DetachedSignature extends java.lang.ObjectTuple-class which bundles together a signature, the signing key that created the signature, an identifier of the signing key and a record of whether or not the signature was verified.
-
-
Constructor Summary
Constructors Constructor Description DetachedSignature(org.bouncycastle.openpgp.PGPSignature signature, org.bouncycastle.openpgp.PGPKeyRing signingKeyRing, SubkeyIdentifier signingKeyIdentifier)Create a newDetachedSignatureobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description OpenPgpV4FingerprintgetFingerprint()Deprecated.org.bouncycastle.openpgp.PGPSignaturegetSignature()Return the OpenPGP signature.SubkeyIdentifiergetSigningKeyIdentifier()Return an identifier pointing to the exact signing key which was used to create this signature.org.bouncycastle.openpgp.PGPKeyRinggetSigningKeyRing()Return the key ring that contains the signing key that created this signature.booleanisVerified()Return true iff the signature is verified.voidsetVerified(boolean verified)Mark thisDetachedSignatureas verified.
-
-
-
Constructor Detail
-
DetachedSignature
public DetachedSignature(org.bouncycastle.openpgp.PGPSignature signature, org.bouncycastle.openpgp.PGPKeyRing signingKeyRing, SubkeyIdentifier signingKeyIdentifier)Create a newDetachedSignatureobject.- Parameters:
signature- signaturesigningKeyRing- signing key that created the signaturesigningKeyIdentifier- identifier of the used signing key
-
-
Method Detail
-
setVerified
public void setVerified(boolean verified)
Mark thisDetachedSignatureas verified.- Parameters:
verified- verified
-
isVerified
public boolean isVerified()
Return true iff the signature is verified.- Returns:
- verified
-
getSignature
public org.bouncycastle.openpgp.PGPSignature getSignature()
Return the OpenPGP signature.- Returns:
- signature
-
getSigningKeyIdentifier
public SubkeyIdentifier getSigningKeyIdentifier()
Return an identifier pointing to the exact signing key which was used to create this signature.- Returns:
- signing key identifier
-
getSigningKeyRing
public org.bouncycastle.openpgp.PGPKeyRing getSigningKeyRing()
Return the key ring that contains the signing key that created this signature.- Returns:
- key ring
-
getFingerprint
@Deprecated public OpenPgpV4Fingerprint getFingerprint()
Deprecated.Return theOpenPgpV4Fingerprintof the key that created the signature.- Returns:
- fingerprint of the signing key
-
-