Package org.pgpainless.signature.builder

# Class PrimaryKeyBindingSignatureBuilder

java.lang.Object
org.pgpainless.signature.builder.AbstractSignatureBuilder<PrimaryKeyBindingSignatureBuilder>
org.pgpainless.signature.builder.PrimaryKeyBindingSignatureBuilder

public class PrimaryKeyBindingSignatureBuilder extends AbstractSignatureBuilder<PrimaryKeyBindingSignatureBuilder>

## Field Summary

### Fields inherited from class org.pgpainless.signature.builder.AbstractSignatureBuilder

`hashAlgorithm, hashedSubpackets, privateSigningKey, publicSigningKey, signatureType, unhashedSubpackets`

## Constructor Summary

Constructors
Constructor
Description
`PrimaryKeyBindingSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey subkey, SecretKeyRingProtector subkeyProtector)`
`PrimaryKeyBindingSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey secretSubKey, SecretKeyRingProtector subkeyProtector, HashAlgorithm hashAlgorithm)`

## Method Summary

Modifier and Type
Method
Description
`void`
`applyCallback(SelfSignatureSubpackets.Callback callback)`
`org.bouncycastle.openpgp.PGPSignature`
`build(org.bouncycastle.openpgp.PGPPublicKey primaryKey)`
`SelfSignatureSubpackets`
`getHashedSubpackets()`
`SelfSignatureSubpackets`
`getUnhashedSubpackets()`
`protected boolean`
`isValidSignatureType(SignatureType type)`
Return true if the given `SignatureType` is a valid choice for the concrete implementation of `AbstractSignatureBuilder`.

### Methods inherited from class org.pgpainless.signature.builder.AbstractSignatureBuilder

`buildAndInitSignatureGenerator, negotiateHashAlgorithm, overrideHashAlgorithm, setSignatureType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PrimaryKeyBindingSignatureBuilder

public PrimaryKeyBindingSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey subkey, SecretKeyRingProtector subkeyProtector) throws org.bouncycastle.openpgp.PGPException

Throws:
  `org.bouncycastle.openpgp.PGPException`

### PrimaryKeyBindingSignatureBuilder

public PrimaryKeyBindingSignatureBuilder(org.bouncycastle.openpgp.PGPSecretKey secretSubKey, SecretKeyRingProtector subkeyProtector, HashAlgorithm hashAlgorithm) throws org.bouncycastle.openpgp.PGPException

Throws:
  `org.bouncycastle.openpgp.PGPException`

## Method Details

### getHashedSubpackets

public SelfSignatureSubpackets getHashedSubpackets()

### getUnhashedSubpackets

public SelfSignatureSubpackets getUnhashedSubpackets()

### applyCallback

public void applyCallback(@Nullable SelfSignatureSubpackets.Callback callback)

### isValidSignatureType

protected boolean isValidSignatureType(SignatureType type)
Description copied from class: `AbstractSignatureBuilder`
Return true if the given `SignatureType` is a valid choice for the concrete implementation of `AbstractSignatureBuilder`.

Specified by:
  `isValidSignatureType` in class `AbstractSignatureBuilder<PrimaryKeyBindingSignatureBuilder>`
Parameters:
  `type` - type
Returns:
  return true if valid, false otherwise

### build

public org.bouncycastle.openpgp.PGPSignature build(org.bouncycastle.openpgp.PGPPublicKey primaryKey) throws org.bouncycastle.openpgp.PGPException

Throws:
  `org.bouncycastle.openpgp.PGPException`