Package: org.gradle.plugins.signing.signatory.pgp

## [Java] Class PgpSignatory

- org.gradle.plugins.signing.signatory.pgp.PgpSignatory

- PGP signatory from PGP key and password.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `PgpSignatory (String name, org.bouncycastle.openpgp.PGPSecretKey secretKey, String password)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `org.bouncycastle.openpgp.PGPSignatureGenerator` | `createSignatureGenerator()`
    `PgpKeyId` | `getKeyId()`
    `String` | `getName()`
    `void` | `sign(InputStream toSign, OutputStream signatureDestination)` Exhausts `toSign`, and writes the signature to `signatureDestination`.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class SignatorySupport` | `sign`
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()`

- - ### Constructor Detail

    - #### public PgpSignatory(String name, org.bouncycastle.openpgp.PGPSecretKey secretKey, String password)

  - ### Method Detail

    - #### public org.bouncycastle.openpgp.PGPSignatureGenerator createSignatureGenerator()

    - #### public PgpKeyId getKeyId()

    - #### @Override public final String getName()

    - #### @Override public void sign(InputStream toSign, OutputStream signatureDestination)

      Exhausts `toSign`, and writes the signature to `signatureDestination`. The caller is responsible for closing the streams, though the output WILL be flushed.