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 voidapplyCallback(BaseSignatureSubpackets.Callback callback)SignatureSubpacketsgetHashedSubpackets()org.bouncycastle.openpgp.PGPSignatureGeneratorgetSignatureGenerator()SignatureSubpacketsgetUnhashedSubpackets()protected booleanisValidSignatureType(SignatureType type)Return true if the givenSignatureTypeis 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:AbstractSignatureBuilderReturn true if the givenSignatureTypeis a valid choice for the concrete implementation ofAbstractSignatureBuilder.- Specified by:
isValidSignatureTypein 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
-
-