Package org.pgpainless.signature.builder
Class SelfSignatureBuilder
- java.lang.Object
-
- org.pgpainless.signature.builder.AbstractSignatureBuilder<SelfSignatureBuilder>
-
- org.pgpainless.signature.builder.SelfSignatureBuilder
-
public class SelfSignatureBuilder extends AbstractSignatureBuilder<SelfSignatureBuilder>
-
-
Field Summary
-
Fields inherited from class org.pgpainless.signature.builder.AbstractSignatureBuilder
hashAlgorithm, hashedSubpackets, privateSigningKey, publicSigningKey, signatureType, unhashedSubpackets
-
-
Constructor Summary
Constructors Constructor Description SelfSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey signingKey, SecretKeyRingProtector protector)
SelfSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey primaryKey, SecretKeyRingProtector primaryKeyProtector, org.bouncycastle.openpgp.PGPSignature oldCertification)
SelfSignatureBuilder(SignatureType signatureType, org.bouncycastle.openpgp.PGPSecretKey signingKey, SecretKeyRingProtector protector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyCallback(SelfSignatureSubpackets.Callback callback)
org.bouncycastle.openpgp.PGPSignature
build(org.bouncycastle.openpgp.PGPPublicKey certifiedKey, String userId)
org.bouncycastle.openpgp.PGPSignature
build(org.bouncycastle.openpgp.PGPPublicKey certifiedKey, org.bouncycastle.openpgp.PGPUserAttributeSubpacketVector userAttribute)
SelfSignatureSubpackets
getHashedSubpackets()
SelfSignatureSubpackets
getUnhashedSubpackets()
protected boolean
isValidSignatureType(SignatureType type)
Return true if the givenSignatureType
is a valid choice for the concrete implementation ofAbstractSignatureBuilder
.-
Methods inherited from class org.pgpainless.signature.builder.AbstractSignatureBuilder
buildAndInitSignatureGenerator, negotiateHashAlgorithm, overrideHashAlgorithm, setSignatureType
-
-
-
-
Constructor Detail
-
SelfSignatureBuilder
public SelfSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey signingKey, SecretKeyRingProtector protector) throws org.bouncycastle.openpgp.PGPException
- Throws:
org.bouncycastle.openpgp.PGPException
-
SelfSignatureBuilder
public SelfSignatureBuilder(SignatureType signatureType, org.bouncycastle.openpgp.PGPSecretKey signingKey, SecretKeyRingProtector protector) throws org.bouncycastle.openpgp.PGPException
- Throws:
org.bouncycastle.openpgp.PGPException
-
SelfSignatureBuilder
public SelfSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey primaryKey, SecretKeyRingProtector primaryKeyProtector, org.bouncycastle.openpgp.PGPSignature oldCertification) throws org.bouncycastle.openpgp.PGPException
- Throws:
org.bouncycastle.openpgp.PGPException
-
-
Method Detail
-
getHashedSubpackets
public SelfSignatureSubpackets getHashedSubpackets()
-
getUnhashedSubpackets
public SelfSignatureSubpackets getUnhashedSubpackets()
-
applyCallback
public void applyCallback(@Nullable SelfSignatureSubpackets.Callback callback)
-
build
public org.bouncycastle.openpgp.PGPSignature build(org.bouncycastle.openpgp.PGPPublicKey certifiedKey, String userId) throws org.bouncycastle.openpgp.PGPException
- Throws:
org.bouncycastle.openpgp.PGPException
-
build
public org.bouncycastle.openpgp.PGPSignature build(org.bouncycastle.openpgp.PGPPublicKey certifiedKey, org.bouncycastle.openpgp.PGPUserAttributeSubpacketVector userAttribute) throws org.bouncycastle.openpgp.PGPException
- Throws:
org.bouncycastle.openpgp.PGPException
-
isValidSignatureType
protected boolean isValidSignatureType(SignatureType type)
Description copied from class:AbstractSignatureBuilder
Return true if the givenSignatureType
is a valid choice for the concrete implementation ofAbstractSignatureBuilder
.- Specified by:
isValidSignatureType
in classAbstractSignatureBuilder<SelfSignatureBuilder>
- Parameters:
type
- type- Returns:
- return true if valid, false otherwise
-
-