Package org.pgpainless.signature.builder
Class UniversalSignatureBuilder
- java.lang.Object
-
- org.pgpainless.signature.builder.AbstractSignatureBuilder<UniversalSignatureBuilder>
-
- org.pgpainless.signature.builder.UniversalSignatureBuilder
-
public class UniversalSignatureBuilder extends AbstractSignatureBuilder<UniversalSignatureBuilder>
Signature builder without restrictions on subpacket contents.
-
-
Field Summary
-
Fields inherited from class org.pgpainless.signature.builder.AbstractSignatureBuilder
hashAlgorithm, hashedSubpackets, privateSigningKey, publicSigningKey, signatureType, unhashedSubpackets
-
-
Constructor Summary
Constructors Constructor Description UniversalSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey certificationKey, SecretKeyRingProtector protector, org.bouncycastle.openpgp.PGPSignature archetypeSignature)
UniversalSignatureBuilder(SignatureType signatureType, org.bouncycastle.openpgp.PGPSecretKey signingKey, SecretKeyRingProtector protector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyCallback(BaseSignatureSubpackets.Callback callback)
SignatureSubpackets
getHashedSubpackets()
org.bouncycastle.openpgp.PGPSignatureGenerator
getSignatureGenerator()
SignatureSubpackets
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
-
UniversalSignatureBuilder
public UniversalSignatureBuilder(SignatureType signatureType, org.bouncycastle.openpgp.PGPSecretKey signingKey, SecretKeyRingProtector protector) throws org.bouncycastle.openpgp.PGPException
- Throws:
org.bouncycastle.openpgp.PGPException
-
UniversalSignatureBuilder
public UniversalSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey certificationKey, SecretKeyRingProtector protector, org.bouncycastle.openpgp.PGPSignature archetypeSignature) throws org.bouncycastle.openpgp.PGPException
- Throws:
org.bouncycastle.openpgp.PGPException
-
-
Method Detail
-
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<UniversalSignatureBuilder>
- Parameters:
type
- type- Returns:
- return true if valid, false otherwise
-
getHashedSubpackets
public SignatureSubpackets getHashedSubpackets()
-
getUnhashedSubpackets
public SignatureSubpackets getUnhashedSubpackets()
-
applyCallback
public void applyCallback(@Nullable BaseSignatureSubpackets.Callback callback)
-
getSignatureGenerator
public org.bouncycastle.openpgp.PGPSignatureGenerator getSignatureGenerator() throws org.bouncycastle.openpgp.PGPException
- Throws:
org.bouncycastle.openpgp.PGPException
-
-